Hard to find documentation about embedding script languages
Posted by Daniel Brahneborg on 2007 February 27
It was quite easy to find information on how to embed Ruby in a C application. The book “Programming in Ruby”, the ruby.h file and some googling, and it got together quite nicely. At least once I learned to always wrap calls with rb_protect and store everything as globals.
Feeling a bit proud, I started looking for information on how to do the same thing with PHP, Perl, Python and whatnot. For some reason, I could hardly find anything at all. Not even the documentation for Parrot contained enough information.
For PHP, it seems one should use something called SAPI. However, neither php.net nor zend.com contained any information about it. For Python it was slightly better, but not much.
Is it really that unique to want to be able to run scripted code from within an application, being able to pass parameters in, getting values back? Odd. Very odd.
Andra bloggar om: programmering, ruby, php, perl
