mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Add native StringDecoder (#1188)
* Add native StringDecoder * fix upon reviews * add Constructor and use LazyClassStructure
This commit is contained in:
15
src/bun.js/modules/StringDecoderModule.h
Normal file
15
src/bun.js/modules/StringDecoderModule.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "../bindings/ZigGlobalObject.h"
|
||||
#include "../bindings/JSStringDecoder.h"
|
||||
#include "JavaScriptCore/JSGlobalObject.h"
|
||||
|
||||
namespace Zig {
|
||||
|
||||
inline void generateStringDecoderSourceCode(JSC::JSGlobalObject* lexicalGlobalObject, JSC::Identifier moduleKey, Vector<JSC::Identifier, 4>& exportNames, JSC::MarkedArgumentBuffer& exportValues) {
|
||||
JSC::VM& vm = lexicalGlobalObject->vm();
|
||||
GlobalObject* globalObject = reinterpret_cast<GlobalObject*>(lexicalGlobalObject);
|
||||
|
||||
exportNames.append(JSC::Identifier::fromString(vm, "StringDecoder"_s));
|
||||
exportValues.append(globalObject->JSStringDecoder());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user