Skip to content

Commit

Permalink
C++ compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmut Holzgraefe committed May 20, 2003
1 parent b5bef8f commit cb71ac0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Zend/zend_API.h
Expand Up @@ -58,7 +58,9 @@ BEGIN_EXTERN_C()
#define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)

#define ZEND_GET_MODULE(name) \
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
BEGIN_EXTERN_C()\
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\
END_EXTERN_C()

#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
Expand Down
2 changes: 2 additions & 0 deletions Zend/zend_constants.h
Expand Up @@ -45,6 +45,7 @@ typedef struct _zend_constant {
#define REGISTER_MAIN_STRING_CONSTANT(name, str, flags) zend_register_string_constant((name), sizeof(name), (str), (flags), 0 TSRMLS_CC)
#define REGISTER_MAIN_STRINGL_CONSTANT(name, str, len, flags) zend_register_stringl_constant((name), sizeof(name), (str), (len), (flags), 0 TSRMLS_CC)

BEGIN_EXTERN_C()
void clean_module_constants(int module_number TSRMLS_DC);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(TSRMLS_D);
Expand All @@ -59,6 +60,7 @@ ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *st
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
END_EXTERN_C();

#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant

Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_operators.h
Expand Up @@ -152,7 +152,7 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
end -= needle_len;

while (p <= end) {
if ((p = memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
if ((p = (char *)memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
if (!memcmp(needle, p, needle_len-1)) {
return p;
}
Expand Down

0 comments on commit cb71ac0

Please sign in to comment.