Giter Site home page Giter Site logo

ning / boxwood Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 4.0 123 KB

Boxwood is a PHP extension for fast replacement of multiple words in a piece of text. It supports case-sensitive and case-insensitive matching. It requires that the text it operates on be encoded as UTF-8.

Ruby 2.37% C 97.63%

boxwood's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boxwood's Issues

For hhvm , I am facing multiple errors while doing "make"

In file included from /usr/include/php/20151012/main/php.h:34:0,
from /var/www/githubs/david/boxwood/php_boxwood.cpp:19:
/usr/include/php/20151012/main/php_config.h:2189:0: warning: "PACKAGE_VERSION" redefined [enabled by default]
#define PACKAGE_VERSION ""
^
:0:0: note: this is the location of the previous definition
/var/www/githubs/david/boxwood/php_boxwood.cpp:213:49: error: macro "RETVAL_STRINGL" passed 3 arguments, but takes just 2
RETVAL_STRINGL(result, strlen(result), 1);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:70:30: error: variable or field ‘php_bw_trie_dtor’ declared void
static void php_bw_trie_dtor(zend_rsrc_list_entry rsrc TSRMLS_DC)
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:70:30: error: ‘zend_rsrc_list_entry’ was not declared in this scope
/var/www/githubs/david/boxwood/php_boxwood.cpp:70:52: error: ‘rsrc’ was not declared in this scope
static void php_bw_trie_dtor(zend_rsrc_list_entry rsrc TSRMLS_DC)
^
/var/www/githubs/david/boxwood/php_boxwood.cpp: In function ‘int zm_startup_boxwood(int, int)’:
/var/www/githubs/david/boxwood/php_boxwood.cpp:86:52: error: ‘php_bw_trie_dtor’ was not declared in this scope
le_bw_trie = zend_register_list_destructors_ex(php_bw_trie_dtor, NULL, PHP_BOXWOOD_TRIE_RES_NAME, module_number);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp: In function ‘void zif_boxwood_new(zend_execute_data
, zval
)’:
/var/www/githubs/david/boxwood/php_boxwood.cpp:125:58: error: ‘ZEND_REGISTER_RESOURCE’ was not declared in this scope
ZEND_REGISTER_RESOURCE(return_value, trie, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp: In function ‘void zif_boxwood_add_text(zend_execute_data*, zval*)’:
/var/www/githubs/david/boxwood/php_boxwood.cpp:139:31: error: expected primary-expression before ‘struct’
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t*, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:139:99: error: ‘ZEND_FETCH_RESOURCE’ was not declared in this scope
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t*, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp: In function ‘void zif_boxwood_replace_text(zend_execute_data*, zval*)’:
/var/www/githubs/david/boxwood/php_boxwood.cpp:186:37: error: ‘IS_BOOL’ was not declared in this scope
if (Z_TYPE_P(zwordbound) != IS_BOOL) {
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:190:40: error: ‘Z_BVAL_P’ was not declared in this scope
wordbound = Z_BVAL_P(zwordbound) ? 1 : 0;
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:209:31: error: expected primary-expression before ‘struct’
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t*, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:209:99: error: ‘ZEND_FETCH_RESOURCE’ was not declared in this scope
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t*, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:213:9: error: ‘RETVAL_STRINGL’ was not declared in this scope
RETVAL_STRINGL(result, strlen(result), 1);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:222:74: error: cannot convert ‘void**’ to ‘HashPosition* {aka unsigned int*}’ for argument ‘2’ to ‘zval* zend_hash_get_current_data_ex(HashTable*, HashPosition*)’
zend_hash_get_current_data_ex(arr, (void ) &one_text, &ptr) == SUCCESS;
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:224:82: error: ‘Z_STRVAL_PP’ was not declared in this scope
result = (char ) bw_replace_text(trie, (byte ) Z_STRVAL_PP(one_text), replacement[0], wordbound);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:225:58: error: too many arguments to function ‘int add_next_index_string(zval
, const char
)’
add_next_index_string(return_value, result, 1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /var/www/githubs/david/boxwood/php_boxwood.cpp:19:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval arg, const char str);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp: In function ‘void zif_boxwood_set_word_boundary_bytes(zend_execute_data
, zval
)’:
/var/www/githubs/david/boxwood/php_boxwood.cpp:242:31: error: expected primary-expression before ‘struct’
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t
, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
/var/www/githubs/david/boxwood/php_boxwood.cpp:242:99: error: ‘ZEND_FETCH_RESOURCE’ was not declared in this scope
ZEND_FETCH_RESOURCE(trie, struct bw_trie_t
, &znode, -1, PHP_BOXWOOD_TRIE_RES_NAME, le_bw_trie);
^
make[2]: *** [CMakeFiles/boxwood.dir/php_boxwood.cpp.o] Error 1
make[1]: *** [CMakeFiles/boxwood.dir/all] Error 2
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.