During preprocessing, we find directives, and if they specify including other source files, we remove the directive, allocate a new block of memory, copy the first block, append the new source file, and append the second block. Previously, the value of the source pointer was passed into the preprocessing function. When the memory would be (re)allocated, the pointer value could change, but the original pointer would not be updated. Now, the pointer is passed by address, and updated when the memory it points to changes.
8 lines
164 B
C
8 lines
164 B
C
#ifndef TVM_PREPROCESSOR_H_
|
|
#define TVM_PREPROCESSOR_H_
|
|
|
|
#include "tvm_htab.h"
|
|
|
|
int tvm_preprocess(char **src, int *src_len, struct tvm_htab_ctx *defines);
|
|
|
|
#endif
|