mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-08 20:50:16 +00:00
follow up rename of c11_vetor__push
This commit is contained in:
parent
aa3becc518
commit
23c26c7a73
@ -38,7 +38,9 @@
|
||||
#define PK_DEBUG_NO_AUTO_GC 0
|
||||
#define PK_DEBUG_GC_STATS 0
|
||||
#define PK_DEBUG_COMPILER 0
|
||||
#ifndef PK_DEBUG_DATASTRUCTURE
|
||||
#define PK_DEBUG_DATASTRUCTURE 0
|
||||
#endif
|
||||
|
||||
#ifndef PK_DEBUG_PRECOMPILED_EXEC
|
||||
#define PK_DEBUG_PRECOMPILED_EXEC 0
|
||||
|
||||
@ -30,7 +30,7 @@ void pkpy_SourceData__ctor(struct pkpy_SourceData* self,
|
||||
pkpy_Str__take_buf(&self->source, buf, len);
|
||||
|
||||
self->is_precompiled = (strncmp(pkpy_Str__data(&self->source), "pkpy:", 5) == 0);
|
||||
c11_vector__push_back(const char*, &self->line_starts, pkpy_Str__data(&self->source));
|
||||
c11_vector__push(const char*, &self->line_starts, pkpy_Str__data(&self->source));
|
||||
}
|
||||
|
||||
void pkpy_SourceData__dtor(struct pkpy_SourceData* self) {
|
||||
|
||||
@ -11,13 +11,13 @@ void pkpy_SStream__dtor(pkpy_SStream* self) {
|
||||
|
||||
void pkpy_SStream__append_cstr(pkpy_SStream* self, const char* str) {
|
||||
for (int i = 0; str[i] != '\0'; i++) {
|
||||
c11_vector__push_back(char, &self->data, str[i]);
|
||||
c11_vector__push(char, &self->data, str[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void pkpy_SStream__append_cstrn(pkpy_SStream* self, const char* str, int n) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
c11_vector__push_back(char, &self->data, str[i]);
|
||||
c11_vector__push(char, &self->data, str[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ void pkpy_SStream__append_Str(pkpy_SStream* self, const pkpy_Str* str) {
|
||||
}
|
||||
|
||||
void pkpy_SStream__append_char(pkpy_SStream* self, char c) {
|
||||
c11_vector__push_back(char, &self->data, c);
|
||||
c11_vector__push(char, &self->data, c);
|
||||
}
|
||||
|
||||
void pkpy_SStream__append_int(pkpy_SStream* self, int i) {
|
||||
|
||||
@ -99,7 +99,7 @@ char Lexer::eatchar_include_newline() noexcept{
|
||||
curr_char++;
|
||||
if(c == '\n') {
|
||||
current_line++;
|
||||
c11_vector__push_back(const char*, &src->line_starts, curr_char);
|
||||
c11_vector__push(const char*, &src->line_starts, curr_char);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
@ -571,7 +571,7 @@ Error* Lexer::from_precompiled() noexcept{
|
||||
int count = deserializer.read_count();
|
||||
auto precompiled_tokens = &src->_precompiled_tokens;
|
||||
for(int i = 0; i < count; i++) {
|
||||
c11_vector__push_back(Str, precompiled_tokens, Str(deserializer.read_string('\n')));
|
||||
c11_vector__push(Str, precompiled_tokens, Str(deserializer.read_string('\n')));
|
||||
}
|
||||
|
||||
count = deserializer.read_count();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user