Skip to content

Use bool data type for HAVE_* class constants #166

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
Jan 20, 2017
Merged
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
Use bool data type for HAVE_* class constants
  • Loading branch information
stevenhilder committed Mar 9, 2015
commit 7df936165fe1c8d6a73d3bf7fd385f4d8d658952
20 changes: 10 additions & 10 deletions php_memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -4264,39 +4264,39 @@ static void php_memc_register_constants(INIT_FUNC_ARGS)
* Indicate whether igbinary serializer is available
*/
#ifdef HAVE_MEMCACHED_IGBINARY
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_IGBINARY, 1);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_IGBINARY, 1);
#else
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_IGBINARY, 0);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_IGBINARY, 0);
#endif

/*
* Indicate whether json serializer is available
*/
#ifdef HAVE_JSON_API
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_JSON, 1);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_JSON, 1);
#else
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_JSON, 0);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_JSON, 0);
#endif

/*
* Indicate whether msgpack serializer is available
*/
#ifdef HAVE_MEMCACHED_MSGPACK
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_MSGPACK, 1);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_MSGPACK, 1);
#else
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_MSGPACK, 0);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_MSGPACK, 0);
#endif

#ifdef HAVE_MEMCACHED_SESSION
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_SESSION, 1);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_SESSION, 1);
#else
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_SESSION, 0);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_SESSION, 0);
#endif

#ifdef HAVE_MEMCACHED_SASL
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_SASL, 1);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_SASL, 1);
#else
REGISTER_MEMC_CLASS_CONST_LONG(HAVE_SASL, 0);
REGISTER_MEMC_CLASS_CONST_BOOL(HAVE_SASL, 0);
#endif

/*
Expand Down