Skip to content

Commit

Permalink
Running tests without GDB
Browse files Browse the repository at this point in the history
  • Loading branch information
phalcon committed Jun 2, 2013
1 parent 6d2c01c commit ecb000c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ before_script:
- psql -c 'create database phalcon_test;' -U postgres
- psql -U postgres phalcon_test -q -f unit-tests/schemas/postgresql/phalcon_test.sql
- sqlite3 /tmp/phalcon_test.sqlite < unit-tests/schemas/sqlite/phalcon_test.sql
- chmod +x unit-tests/ci/run_script_gdb.sh
- chmod +x unit-tests/ci/run_script.sh

script: ./unit-tests/ci/run_script_gdb.sh
script: ./unit-tests/ci/run_script.sh

notifications:
email:
Expand Down
33 changes: 18 additions & 15 deletions ext/kernel/alternative/fcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ static inline zend_bool phalcon_alt_is_callable_method_ex(zend_class_entry *ce,
*/
int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *key, unsigned int key_length, unsigned long hash_key, char *method_name, unsigned int method_len, unsigned long method_key TSRMLS_DC)
{
zend_phalcon_globals *phalcon_globals_ptr = PHALCON_VGLOBAL;
zend_uint i, exists = 0, is_phalcon_function = 0;
zend_class_entry *current_scope;
zend_class_entry *current_called_scope;
Expand All @@ -214,8 +215,8 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
EX(object) = NULL;

/* Check if a fci_cache is already loaded for this method */
if (key && PHALCON_GLOBAL(function_cache)) {
if (zend_hash_quick_find(PHALCON_GLOBAL(function_cache), key, key_length, hash_key, (void**) &function_handler) == SUCCESS) {
if (key && phalcon_globals_ptr->function_cache) {
if (zend_hash_quick_find(phalcon_globals_ptr->function_cache, key, key_length, hash_key, (void**) &function_handler) == SUCCESS) {
fci_cache->function_handler = *function_handler;
exists = 1;
is_phalcon_function = 1;
Expand Down Expand Up @@ -272,13 +273,13 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
if (is_phalcon_function) {
if (fci_cache->function_handler->type == ZEND_INTERNAL_FUNCTION) {

if (!PHALCON_GLOBAL(function_cache)) {
ALLOC_HASHTABLE(PHALCON_GLOBAL(function_cache));
zend_hash_init(PHALCON_GLOBAL(function_cache), 0, NULL, NULL, 0);
if (!phalcon_globals_ptr->function_cache) {
ALLOC_HASHTABLE(phalcon_globals_ptr->function_cache);
zend_hash_init(phalcon_globals_ptr->function_cache, 0, NULL, NULL, 0);
}

zend_hash_quick_update(
PHALCON_GLOBAL(function_cache),
phalcon_globals_ptr->function_cache,
key,
key_length,
hash_key,
Expand Down Expand Up @@ -533,6 +534,7 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *key, unsigned int key_length, unsigned long hash_key, char *method_name, unsigned int method_len, unsigned long method_key TSRMLS_DC)
{
zend_uint i;
zend_phalcon_globals *phalcon_globals_ptr = PHALCON_VGLOBAL;
zval **original_return_value;
HashTable *calling_symbol_table;
zend_op_array *original_op_array;
Expand All @@ -558,8 +560,8 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
EX(object) = NULL;

/* Check if a fci_cache is already loaded for this method */
if (key && PHALCON_GLOBAL(function_cache)) {
if (zend_hash_quick_find(PHALCON_GLOBAL(function_cache), key, key_length, hash_key, (void**) &function_handler) == SUCCESS) {
if (key && phalcon_globals_ptr->function_cache) {
if (zend_hash_quick_find(phalcon_globals_ptr->function_cache, key, key_length, hash_key, (void**) &function_handler) == SUCCESS) {
fci_cache->function_handler = *function_handler;
exists = 1;
is_phalcon_function = 1;
Expand Down Expand Up @@ -624,13 +626,13 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
if (is_phalcon_function) {
if (fci_cache->function_handler->type == ZEND_INTERNAL_FUNCTION) {

if (!PHALCON_GLOBAL(function_cache)) {
ALLOC_HASHTABLE(PHALCON_GLOBAL(function_cache));
zend_hash_init(PHALCON_GLOBAL(function_cache), 0, NULL, NULL, 0);
if (!phalcon_globals_ptr->function_cache) {
ALLOC_HASHTABLE(phalcon_globals_ptr->function_cache);
zend_hash_init(phalcon_globals_ptr->function_cache, 0, NULL, NULL, 0);
}

zend_hash_quick_update(
PHALCON_GLOBAL(function_cache),
phalcon_globals_ptr->function_cache,
key,
key_length,
hash_key,
Expand Down Expand Up @@ -885,6 +887,7 @@ int phalcon_alt_call_method(zend_fcall_info *fci, zend_class_entry *ce, char *ke
*/
int phalcon_alt_call_user_method(zend_class_entry *ce, zval **object_pp, char *method_name, unsigned int method_len, zval *retval_ptr, zend_uint param_count, zval *params[], unsigned long method_key TSRMLS_DC)
{
zend_phalcon_globals *phalcon_globals_ptr = PHALCON_VGLOBAL;
zval ***params_array;
zend_uint i;
int ex_retval;
Expand All @@ -894,9 +897,9 @@ int phalcon_alt_call_user_method(zend_class_entry *ce, zval **object_pp, char *m
unsigned long hash_key;
char *key;

PHALCON_GLOBAL(recursive_lock)++;
phalcon_globals_ptr->recursive_lock++;

if (PHALCON_GLOBAL(recursive_lock) > 2048) {
if (phalcon_globals_ptr->recursive_lock > 2048) {
ex_retval = FAILURE;
params_array = NULL;
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Maximum recursion depth exceeded");
Expand Down Expand Up @@ -955,7 +958,7 @@ int phalcon_alt_call_user_method(zend_class_entry *ce, zval **object_pp, char *m
}
}

PHALCON_GLOBAL(recursive_lock)--;
phalcon_globals_ptr->recursive_lock--;

if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
Expand Down

0 comments on commit ecb000c

Please sign in to comment.