im trying to do some namespace related experimentation but im getting the
following link errors :
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_init_namespace
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_initialize_class_data
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_do_inheritance
i18n_util.obj : error LNK2001: unresolved external symbol
_zend_register_functions

any chance of exporting the offenders here ?  here's precisely the code im
using (modified from marcus):

/* {{{ register_interface */
/* You will have to alloc the pce before the call and namespace_entry must
be valid */
zend_class_entry* register_class(zend_namespace *namespace_entry,
        zend_class_entry *parent_ce,
        char *class_name,
        zend_function_entry *functions
        TSRMLS_DC)
{
 int name_length = strlen(class_name);
 char *lowercase_name = zend_strndup(class_name, name_length);

 zend_class_entry *pce = emalloc(sizeof(zend_class_entry));

 pce->type = ZEND_INTERNAL_CLASS;
 pce->name_length = name_length;
 pce->name = class_name;

 pce->parent = NULL;
 pce->num_interfaces = 0;

 zend_initialize_class_data(pce, 1 TSRMLS_CC);
 pce->ns = namespace_entry;

 if (functions) {
  zend_register_functions(pce, functions, &pce->function_table,
MODULE_PERSISTENT TSRMLS_CC);
 }

 if (parent_ce) {
  zend_do_inheritance(pce, parent_ce);
 }

 zend_str_tolower(lowercase_name, name_length);
 zend_hash_add(&namespace_entry->class_table, lowercase_name,
    name_length+1, &pce, sizeof(zend_class_entry *), NULL);
 free(lowercase_name);

 return pce;
}
/* }}} */

l0t3k





-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to