mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-08 20:50:16 +00:00
Remove trival accessor
This commit is contained in:
parent
240cec3559
commit
8ad42752b2
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user