Remove trival accessor

This commit is contained in:
方而静 2024-06-11 19:10:12 +08:00
parent 240cec3559
commit 8ad42752b2
Signed by: szTom
GPG Key ID: 072D999D60C6473C
2 changed files with 2 additions and 5 deletions

View File

@ -28,9 +28,6 @@ c11_vector c11_vector__copy(const c11_vector* self);
void* c11_vector__at(c11_vector* self, int index);
void c11_vector__reserve(c11_vector* self, int capacity);
#define c11_vector__size(self) ((self)->count)
#define c11_vector__data(self) ((self)->data)
#define c11__getitem(T, self, index) ((T*)(self)->data)[index]
#define c11__setitem(T, self, index, value) ((T*)(self)->data)[index] = value;

View File

@ -41,8 +41,8 @@ void pkpy_SStream__append_int64(pkpy_SStream* self, int64_t i) {
pkpy_SStream__append_cstr(self, str);
}
pkpy_Str pkpy_SStream__to_Str(pkpy_SStream* self) {
pkpy_Str pkpy_SStream__to_Str(const pkpy_SStream* self) {
pkpy_Str res;
pkpy_Str__ctor2(&res, c11_vector__data(&self->data), c11_vector__size(&self->data));
pkpy_Str__ctor2(&res, self->data.data, self->data.count);
return res;
}