Skip to content

Commit

Permalink
[memory] Start of refactoring away olxc-memory allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed Nov 27, 2024
1 parent d515c44 commit 80638ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TODO.org
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Some useful commands:

There are a *lot* of things to do to make c-xref into modern and maintainable C.


* DOING Refactor to remove olcx-memory allocation from memory.c
* TODO FEATURE: New refactoring: move function for C
** DONE Pick-up pieces from Java version and hack them into a preliminary version
** DONE Accept target position
Expand Down
3 changes: 2 additions & 1 deletion src/cxref.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ int olcxReferenceInternalLessFunction(Reference *r1, Reference *r2) {

static void renameCollationSymbols(SymbolsMenu *menu) {
int len,len1;
char *nn, *cs;
char *cs;
assert(menu);
for (SymbolsMenu *m=menu; m!=NULL; m=m->next) {
cs = strchr(m->references.linkName, LINK_NAME_COLLATE_SYMBOL);
if (cs!=NULL && m->references.type==TypeCppCollate) {
char *nn;
len = strlen(m->references.linkName);
assert(len>=2);
nn = olcxAlloc(len-1);
Expand Down

0 comments on commit 80638ec

Please sign in to comment.