@@ -1555,7 +1555,7 @@ void v8__base__SetDcheckFunction(void (*func)(const char*, int, const char*)) {
15551555// / @param allocator: A Zig std.mem.Allocator
15561556// / @param bytes: The number of bytes to allocate
15571557// / @returns A pointer to the allocated memory, null if allocation failed
1558- char * zigAlloc (void * allocator, uint64_t bytes);
1558+ char * zigAlloc (const void * allocator, uint64_t bytes);
15591559
15601560static inline v8_inspector::StringView toStringView (const char *str, size_t length) {
15611561 auto * stringView = reinterpret_cast <const uint8_t *>(str);
@@ -1580,7 +1580,7 @@ static inline std::string fromStringView(v8::Isolate* isolate, const v8_inspecto
15801580// / @param str: The string to return
15811581// / @param allocator: A Zig std.mem.Allocator
15821582// / @returns string pointer with null terminator, null if allocation failed
1583- const char * toHeapCharPtr (const v8_inspector::String16& str, void * allocator) {
1583+ const char * toHeapCharPtr (const v8_inspector::String16& str, const void * allocator) {
15841584 std::string utf8_str = str.utf8 (); // Note the data*'s lifetime is tied to utf8_str and this may hold the string data on the stack as an SSO, so we need to copy it onto the heap.
15851585 char * heap_str = zigAlloc (allocator, utf8_str.length () + 1 ); // +1 for null terminator, needed to communicate the length to Zig
15861586 if (heap_str == nullptr ) {
@@ -1671,7 +1671,7 @@ void v8_inspector__RemoteObject__DELETE(v8_inspector::protocol::Runtime::RemoteO
16711671}
16721672
16731673// RemoteObject - Type
1674- const char * v8_inspector__RemoteObject__getType (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1674+ const char * v8_inspector__RemoteObject__getType (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
16751675 auto str = self->getType ();
16761676 return toHeapCharPtr (str, allocator);
16771677}
@@ -1683,7 +1683,7 @@ void v8_inspector__RemoteObject__setType(v8_inspector::protocol::Runtime::Remote
16831683bool v8_inspector__RemoteObject__hasSubtype (v8_inspector::protocol::Runtime::RemoteObject* self) {
16841684 return self->hasSubtype ();
16851685}
1686- const char * v8_inspector__RemoteObject__getSubtype (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1686+ const char * v8_inspector__RemoteObject__getSubtype (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
16871687 auto str = self->getSubtype (DEFAULT_STRING);
16881688 return toHeapCharPtr (str, allocator);
16891689}
@@ -1695,7 +1695,7 @@ void v8_inspector__RemoteObject__setSubtype(v8_inspector::protocol::Runtime::Rem
16951695bool v8_inspector__RemoteObject__hasClassName (v8_inspector::protocol::Runtime::RemoteObject* self) {
16961696 return self->hasClassName ();
16971697}
1698- const char * v8_inspector__RemoteObject__getClassName (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1698+ const char * v8_inspector__RemoteObject__getClassName (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
16991699 auto str = self->getClassName (DEFAULT_STRING);
17001700 return toHeapCharPtr (str, allocator);
17011701}
@@ -1718,7 +1718,7 @@ void v8_inspector__RemoteObject__setValue(v8_inspector::protocol::Runtime::Remot
17181718bool v8_inspector__RemoteObject__hasUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self) {
17191719 return self->hasUnserializableValue ();
17201720}
1721- const char * v8_inspector__RemoteObject__getUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1721+ const char * v8_inspector__RemoteObject__getUnserializableValue (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17221722 auto str = self->getUnserializableValue (DEFAULT_STRING);
17231723 return toHeapCharPtr (str, allocator);
17241724}
@@ -1730,7 +1730,7 @@ void v8_inspector__RemoteObject__setUnserializableValue(v8_inspector::protocol::
17301730bool v8_inspector__RemoteObject__hasDescription (v8_inspector::protocol::Runtime::RemoteObject* self) {
17311731 return self->hasDescription ();
17321732}
1733- const char * v8_inspector__RemoteObject__getDescription (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1733+ const char * v8_inspector__RemoteObject__getDescription (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17341734 auto str = self->getDescription (DEFAULT_STRING);
17351735 return toHeapCharPtr (str, allocator);
17361736}
@@ -1754,7 +1754,7 @@ bool v8_inspector__RemoteObject__hasObjectId(v8_inspector::protocol::Runtime::Re
17541754 return self->hasObjectId ();
17551755}
17561756
1757- const char * v8_inspector__RemoteObject__getObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, void * allocator) {
1757+ const char * v8_inspector__RemoteObject__getObjectId (v8_inspector::protocol::Runtime::RemoteObject* self, const void * allocator) {
17581758 auto str = self->getObjectId (DEFAULT_STRING);
17591759 return toHeapCharPtr (str, allocator);
17601760}
0 commit comments