projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
sqlite test
[m6w6/ext-psi]
/
src
/
context.c
diff --git
a/src/context.c
b/src/context.c
index 17699a49a591db9fcbbc03a013a9df2a15681872..c86a595d8c79be86b07db026024c476080d3adcf 100644
(file)
--- a/
src/context.c
+++ b/
src/context.c
@@
-108,7
+108,7
@@
PSI_Context *PSI_ContextInit(PSI_Context *C, PSI_ContextOps *ops, PSI_ContextErr
decl_union *dunion = init_decl_union(predef_union->var_name, dargs);
dunion->size = predef_union->size;
decl_union *dunion = init_decl_union(predef_union->var_name, dargs);
dunion->size = predef_union->size;
- dunion->align =
d
union->offset;
+ dunion->align =
predef_
union->offset;
for (member = &predef_union[1]; member->type_tag; ++member) {
decl_type *type;
decl_var *dvar;
for (member = &predef_union[1]; member->type_tag; ++member) {
decl_type *type;
decl_var *dvar;
@@
-184,7
+184,7
@@
void PSI_ContextBuild(PSI_Context *C, const char *paths)
{
int i, n;
char *sep = NULL, *cpy = strdup(paths), *ptr = cpy;
{
int i, n;
char *sep = NULL, *cpy = strdup(paths), *ptr = cpy;
- struct dirent **entries
= NULL
;
+ struct dirent **entries;
do {
sep = strchr(ptr, ':');
do {
sep = strchr(ptr, ':');
@@
-193,6
+193,7
@@
void PSI_ContextBuild(PSI_Context *C, const char *paths)
*sep = 0;
}
*sep = 0;
}
+ entries = NULL;
n = php_scandir(ptr, &entries, psi_select_dirent, alphasort);
if (n > 0) {
n = php_scandir(ptr, &entries, psi_select_dirent, alphasort);
if (n > 0) {
@@
-341,6
+342,12
@@
void PSI_ContextDtor(PSI_Context *C)
}
free(C->structs);
}
}
free(C->structs);
}
+ if (C->unions) {
+ if (C->unions->list) {
+ free(C->unions->list);
+ }
+ free(C->unions);
+ }
if (C->enums) {
if (C->enums->list) {
free(C->enums->list);
if (C->enums) {
if (C->enums->list) {
free(C->enums->list);