Skip to content

Php7 #211

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 7 commits into from
Feb 1, 2016
Merged

Php7 #211

Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Cleaning up driver for php7. WIP
  • Loading branch information
mkoppanen committed Jan 29, 2016
commit dc5b22a8dace7373c1ef9d2946e89a660ed35b20
1,141 changes: 545 additions & 596 deletions php_memcached.c

Large diffs are not rendered by default.

83 changes: 42 additions & 41 deletions php_memcached_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,46 +129,60 @@ typedef struct {
#endif

ZEND_BEGIN_MODULE_GLOBALS(php_memcached)

#ifdef HAVE_MEMCACHED_SESSION
zend_bool sess_locking_enabled;
long sess_lock_wait;
long sess_lock_max_wait;
long sess_lock_expire;
char* sess_prefix;
zend_bool sess_locked;
char* sess_lock_key;
int sess_lock_key_len;

int sess_number_of_replicas;
zend_bool sess_randomize_replica_read;
zend_bool sess_remove_failed_enabled;
long sess_connect_timeout;
zend_bool sess_consistent_hash_enabled;
zend_bool sess_binary_enabled;
/* Session related variables */
struct {
zend_bool lock_enabled;
zend_long lock_wait_max;
zend_long lock_wait_min;
zend_long lock_retries;
zend_long lock_expiration;

zend_bool compression_enabled;
zend_bool binary_protocol_enabled;
zend_bool consistent_hash_enabled;

zend_long server_failure_limit;
zend_long number_of_replicas;
zend_bool randomize_replica_read_enabled;
zend_bool remove_failed_servers_enabled;

zend_long connect_timeout;

char *prefix;
zend_bool persistent_enabled;

char *sasl_username;
char *sasl_password;
} session_ini;

#if HAVE_MEMCACHED_SASL
char *sess_sasl_username;
char *sess_sasl_password;
zend_bool sess_sasl_data;
#endif
#endif
char *serializer_name;
enum memcached_serializer serializer;

char *compression_type;
int compression_type_real;
int compression_threshold;
struct {
char *serializer_name;
char *compression_type;
zend_long compression_threshold;
double compression_factor;
zend_long store_retry_count;

double compression_factor;
#if HAVE_MEMCACHED_SASL
zend_bool use_sasl;
zend_bool sasl_enabled;
#endif

/* Converted values*/
enum memcached_serializer serializer;
zend_long compression_type_real;
} memc_ini;



#ifdef HAVE_MEMCACHED_PROTOCOL
struct {
php_memc_server_cb_t callbacks [MEMC_SERVER_ON_MAX];
} server;
#endif
long store_retry_count;

ZEND_END_MODULE_GLOBALS(php_memcached)

PHP_RINIT_FUNCTION(memcached);
Expand All @@ -177,19 +191,6 @@ PHP_MINIT_FUNCTION(memcached);
PHP_MSHUTDOWN_FUNCTION(memcached);
PHP_MINFO_FUNCTION(memcached);

#ifdef ZTS
#define MEMC_G(v) TSRMG(php_memcached_globals_id, zend_php_memcached_globals *, v)
#else
#define MEMC_G(v) (php_memcached_globals.v)
#endif

typedef struct {
memcached_st *memc_sess;
zend_bool is_persistent;
} memcached_sess;

int php_memc_sess_list_entry(void);

char *php_memc_printable_func (zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC);

memcached_return php_memcached_exist (memcached_st *memc, zend_string *key);
Expand Down
Loading