Skip to content
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

Use interned strings in mvc/model/query.c #1132

Merged
merged 8 commits into from Aug 22, 2013
Merged
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
Prev Previous commit
Next Next commit
More interned strings
  • Loading branch information
sjinks committed Aug 22, 2013
commit 6aa5f4126c009b87c68f5e1a8f091a36182c4701
18 changes: 18 additions & 0 deletions ext/interned-strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,22 @@

#include "interned-strings.h"

const char *phalcon_interned_alias = NULL;
const char *phalcon_interned_all = NULL;
const char *phalcon_interned_arguments = NULL;
const char *phalcon_interned_balias = NULL;
const char *phalcon_interned_binary_op = NULL;
const char *phalcon_interned_column = NULL;
const char *phalcon_interned_columns = NULL;
const char *phalcon_interned_conditions = NULL;
const char *phalcon_interned_delete = NULL;
const char *phalcon_interned_distinct = NULL;
const char *phalcon_interned_domain = NULL;
const char *phalcon_interned_expr = NULL;
const char *phalcon_interned_fields = NULL;
const char *phalcon_interned_functionCall = NULL;
const char *phalcon_interned_group = NULL;
const char *phalcon_interned_groupBy = NULL;
const char *phalcon_interned_having = NULL;
const char *phalcon_interned_joins = NULL;
const char *phalcon_interned_left = NULL;
Expand All @@ -50,36 +53,45 @@ const char *phalcon_interned_modelsCache = NULL;
const char *phalcon_interned_modelsManager = NULL;
const char *phalcon_interned_modelsMetadata = NULL;
const char *phalcon_interned_name = NULL;
const char *phalcon_interned_ns_alias = NULL;
const char *phalcon_interned_number = NULL;
const char *phalcon_interned_offset = NULL;
const char *phalcon_interned_op = NULL;
const char *phalcon_interned_order = NULL;
const char *phalcon_interned_orderBy = NULL;
const char *phalcon_interned_qualified = NULL;
const char *phalcon_interned_qualifiedName = NULL;
const char *phalcon_interned_right = NULL;
const char *phalcon_interned_select = NULL;
const char *phalcon_interned_sort = NULL;
const char *phalcon_interned_source = NULL;
const char *phalcon_interned_sqlAlias = NULL;
const char *phalcon_interned_table = NULL;
const char *phalcon_interned_tables = NULL;
const char *phalcon_interned_type = NULL;
const char *phalcon_interned_update = NULL;
const char *phalcon_interned_value = NULL;
const char *phalcon_interned_values = NULL;
const char *phalcon_interned_where = NULL;

void phalcon_init_interned_strings(TSRMLS_D)
{
phalcon_interned_alias = zend_new_interned_string(SS("alias"), 0 TSRMLS_CC);
phalcon_interned_all = zend_new_interned_string(SS("all"), 0 TSRMLS_CC);
phalcon_interned_arguments = zend_new_interned_string(SS("arguments"), 0 TSRMLS_CC);
phalcon_interned_balias = zend_new_interned_string(SS("balias"), 0 TSRMLS_CC);
phalcon_interned_binary_op = zend_new_interned_string(SS("binary-op"), 0 TSRMLS_CC);
phalcon_interned_column = zend_new_interned_string(SS("column"), 0 TSRMLS_CC);
phalcon_interned_columns = zend_new_interned_string(SS("columns"), 0 TSRMLS_CC);
phalcon_interned_conditions = zend_new_interned_string(SS("conditions"), 0 TSRMLS_CC);
phalcon_interned_delete = zend_new_interned_string(SS("delete"), 0 TSRMLS_CC);
phalcon_interned_distinct = zend_new_interned_string(SS("distinct"), 0 TSRMLS_CC);
phalcon_interned_domain = zend_new_interned_string(SS("domain"), 0 TSRMLS_CC);
phalcon_interned_expr = zend_new_interned_string(SS("expr"), 0 TSRMLS_CC);
phalcon_interned_fields = zend_new_interned_string(SS("fields"), 0 TSRMLS_CC);
phalcon_interned_functionCall = zend_new_interned_string(SS("functionCall"), 0 TSRMLS_CC);
phalcon_interned_group = zend_new_interned_string(SS("group"), 0 TSRMLS_CC);
phalcon_interned_groupBy = zend_new_interned_string(SS("groupBy"), 0 TSRMLS_CC);
phalcon_interned_having = zend_new_interned_string(SS("having"), 0 TSRMLS_CC);
phalcon_interned_joins = zend_new_interned_string(SS("joins"), 0 TSRMLS_CC);
phalcon_interned_left = zend_new_interned_string(SS("left"), 0 TSRMLS_CC);
Expand All @@ -90,17 +102,23 @@ void phalcon_init_interned_strings(TSRMLS_D)
phalcon_interned_modelsManager = zend_new_interned_string(SS("modelsManager"), 0 TSRMLS_CC);
phalcon_interned_modelsMetadata = zend_new_interned_string(SS("modelsMetadata"), 0 TSRMLS_CC);
phalcon_interned_name = zend_new_interned_string(SS("name"), 0 TSRMLS_CC);
phalcon_interned_ns_alias = zend_new_interned_string(SS("ns-alias"), 0 TSRMLS_CC);
phalcon_interned_number = zend_new_interned_string(SS("number"), 0 TSRMLS_CC);
phalcon_interned_offset = zend_new_interned_string(SS("offset"), 0 TSRMLS_CC);
phalcon_interned_op = zend_new_interned_string(SS("op"), 0 TSRMLS_CC);
phalcon_interned_order = zend_new_interned_string(SS("order"), 0 TSRMLS_CC);
phalcon_interned_orderBy = zend_new_interned_string(SS("orderBy"), 0 TSRMLS_CC);
phalcon_interned_qualified = zend_new_interned_string(SS("qualified"), 0 TSRMLS_CC);
phalcon_interned_qualifiedName = zend_new_interned_string(SS("qualifiedName"), 0 TSRMLS_CC);
phalcon_interned_right = zend_new_interned_string(SS("right"), 0 TSRMLS_CC);
phalcon_interned_select = zend_new_interned_string(SS("select"), 0 TSRMLS_CC);
phalcon_interned_sort = zend_new_interned_string(SS("sort"), 0 TSRMLS_CC);
phalcon_interned_source = zend_new_interned_string(SS("source"), 0 TSRMLS_CC);
phalcon_interned_sqlAlias = zend_new_interned_string(SS("sqlAlias"), 0 TSRMLS_CC);
phalcon_interned_table = zend_new_interned_string(SS("table"), 0 TSRMLS_CC);
phalcon_interned_tables = zend_new_interned_string(SS("tables"), 0 TSRMLS_CC);
phalcon_interned_type = zend_new_interned_string(SS("type"), 0 TSRMLS_CC);
phalcon_interned_update = zend_new_interned_string(SS("update"), 0 TSRMLS_CC);
phalcon_interned_value = zend_new_interned_string(SS("value"), 0 TSRMLS_CC);
phalcon_interned_values = zend_new_interned_string(SS("values"), 0 TSRMLS_CC);
phalcon_interned_where = zend_new_interned_string(SS("where"), 0 TSRMLS_CC);
Expand Down
9 changes: 9 additions & 0 deletions ext/interned-strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@

#include "main/php.h"

extern const char *phalcon_interned_alias;
extern const char *phalcon_interned_all;
extern const char *phalcon_interned_arguments;
extern const char *phalcon_interned_balias;
extern const char *phalcon_interned_binary_op;
extern const char *phalcon_interned_column;
extern const char *phalcon_interned_columns;
extern const char *phalcon_interned_conditions;
extern const char *phalcon_interned_delete;
extern const char *phalcon_interned_distinct;
extern const char *phalcon_interned_domain;
extern const char *phalcon_interned_expr;
extern const char *phalcon_interned_fields;
extern const char *phalcon_interned_functionCall;
extern const char *phalcon_interned_group;
extern const char *phalcon_interned_groupBy;
extern const char *phalcon_interned_having;
extern const char *phalcon_interned_joins;
extern const char *phalcon_interned_left;
Expand All @@ -45,17 +48,23 @@ extern const char *phalcon_interned_modelsCache;
extern const char *phalcon_interned_modelsManager;
extern const char *phalcon_interned_modelsMetadata;
extern const char *phalcon_interned_name;
extern const char *phalcon_interned_ns_alias;
extern const char *phalcon_interned_number;
extern const char *phalcon_interned_offset;
extern const char *phalcon_interned_op;
extern const char *phalcon_interned_order;
extern const char *phalcon_interned_orderBy;
extern const char *phalcon_interned_qualified;
extern const char *phalcon_interned_qualifiedName;
extern const char *phalcon_interned_right;
extern const char *phalcon_interned_select;
extern const char *phalcon_interned_sort;
extern const char *phalcon_interned_source;
extern const char *phalcon_interned_sqlAlias;
extern const char *phalcon_interned_table;
extern const char *phalcon_interned_tables;
extern const char *phalcon_interned_type;
extern const char *phalcon_interned_update;
extern const char *phalcon_interned_value;
extern const char *phalcon_interned_values;
extern const char *phalcon_interned_where;
Expand Down