Skip to content

Fix duplicate symbol errors on LLVM (MacOS) #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions php_weakref.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
#include "wr_weakmap.h"
#include "php_weakref.h"

#ifdef ZTS
int weakref_globals_id;
#else
zend_weakref_globals weakref_globals;
#endif

void wr_store_init(TSRMLS_D) /* {{{ */
{
wr_store *store = emalloc(sizeof(wr_store));
Expand Down
4 changes: 2 additions & 2 deletions php_weakref.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ void wr_store_attach(zend_object *intern, wr_ref_dtor dtor, zval *ref TSRMLS_DC)

#ifdef ZTS
#define WR_G(v) TSRMG(weakref_globals_id, zend_weakref_globals *, v)
int weakref_globals_id;
extern int weakref_globals_id;
#else
#define WR_G(v) (weakref_globals.v)
zend_weakref_globals weakref_globals;
extern zend_weakref_globals weakref_globals;
#endif

#endif /* PHP_WEAKREF_H */
Expand Down
3 changes: 3 additions & 0 deletions wr_weakmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include "wr_weakmap.h"
#include "php_weakref.h"

zend_object_handlers wr_handler_WeakMap;
WEAKREF_API zend_class_entry *wr_ce_WeakMap;


static void wr_weakmap_ref_dtor(void *ref_object, zend_object_handle ref_handle, zend_object *wref_obj TSRMLS_DC) { /* {{{ */
wr_weakmap_object *intern = (wr_weakmap_object *)wref_obj;
Expand Down
3 changes: 0 additions & 3 deletions wr_weakmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ typedef struct _wr_weakmap_object {

extern WEAKREF_API zend_class_entry *wr_ce_WeakMap;

zend_object_handlers wr_handler_WeakMap;
WEAKREF_API zend_class_entry *wr_ce_WeakMap;

#endif /* WR_WEAKMAP_H */

/*
Expand Down
3 changes: 3 additions & 0 deletions wr_weakref.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include "wr_weakref.h"
#include "php_weakref.h"

zend_object_handlers wr_handler_WeakRef;
WEAKREF_API zend_class_entry *wr_ce_WeakRef;


static void wr_weakref_ref_dtor(void *ref_object, zend_object_handle ref_handle, zend_object *wref_obj TSRMLS_DC) { /* {{{ */
wr_weakref_object *wref = (wr_weakref_object *)wref_obj;
Expand Down
3 changes: 0 additions & 3 deletions wr_weakref.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ typedef struct _wr_weakref_object {

extern WEAKREF_API zend_class_entry *wr_ce_WeakRef;

zend_object_handlers wr_handler_WeakRef;
WEAKREF_API zend_class_entry *wr_ce_WeakRef;

#endif /* WR_WEAKREF_H */

/*
Expand Down