Logo
Explore Mail Help
Register Sign In
Mirror/wren
1
0
Fork 1
You've already forked wren
mirror of https://github.com/wren-lang/wren.git synced 2026-01-11 14:18:42 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
99d2f0b8fc2686134b32b18166e037639f7e9f2c
wren/test/api/foreign_class.h

6 lines
176 B
C
Raw Normal View History

First pass at implementing foreign classes. Most of the pieces are there: - You can declare a foreign class. - It will call your C function to provide an allocator function. - Whenever a foreign object is created, it calls the allocator. - Foreign methods can access the foreign bytes of an object. - Most of the runtime checking is in place for things like subclassing foreign classes. There is still some loose ends to tie up: - Finalizers are not called. - Some of the error-handling could be better. - The GC doesn't track how much memory a marked foreign object uses.
2015-08-15 12:07:53 -07:00
#include "wren.h"
WrenForeignMethodFn foreignClassBindMethod(const char* signature);
void foreignClassBindClass(
const char* className, WrenForeignClassMethods* methods);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.0 Page: 136ms Template: 21ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API