[PHP-DEV] Declaring php-class static member functions from within C/C++

2006-03-17 Thread an . dromeda
If I define/declare php class methods via: INIT_CLASS_ENTRY(ce, phpclassname, myclassmethods); where myclassmethods is defined as eg: function_entry myclass::myclassmethods[] = { PHP_ME(myclass, __construct, arginfo_Guid__construct, ZEND_ACC_PUBLIC) PHP_ME(myclass, getValue, NULL, ZE

[PHP-DEV] RESOLVED: Template Linkage for a PhpClassFactory in C++

2006-03-13 Thread an . dromeda
C++ Templates: The complete guide (David Vandevoorde) addresses the issue. First workaround is simply to include what would normally be the .cpp code in the .h header. Not sure that's ideal, but it works, so that's the issue resolved, (or sidelined for now). Apparently there's also export, but fi

[PHP-DEV] Template Linkage for a PhpClassFactory in C++

2006-03-13 Thread an . dromeda
The saga continues, with progress towards a (hoped for) marriage between Php and C++ that 'looks like' C++ to the extension developer. I'm exploring a templated version of PhpClassFactory (vs possible root PhpClassFactoryObject) which is making progress, but a linking error not dissimilar to sepa

[PHP-DEV] RESOLVED: INFO: INIT_CLASS_ENTRY fails on various char entry formats

2006-03-12 Thread an . dromeda
Answering my own question/observation, the following workarounds allow use of char* name="myclass"; and overbuffered char name[100] = "myclass"; both of which fail normally since INIT_CLASS_ENTRY uses sizeof() not strlen() // for various char* or string params char* phpclassname = "myclass"; char

[PHP-DEV] INFO: INIT_CLASS_ENTRY fails on various char entry formats

2006-03-12 Thread an . dromeda
I was surprised to find that my class entry failed when I tried to pass the class name as a parameter. Two common styles (char *myclassname = "myclass"; and (over-buffered) char myclassname[100] = "myclass";) both fail with INIT_CLASS_ENTRY for a reason that becomes apparent when you look at the