From b8946194000beb9ef2abf6f34844400aa778e108 Mon Sep 17 00:00:00 2001 From: Cecil Date: Wed, 25 Oct 2017 22:51:00 -0600 Subject: [PATCH] on #377, #323 - many things * rename shoes_queue_download to shoes_native_download * refactor to get rid of the goto. It was was more annoying than duplicating code. Separate code paths for cache, no-cache. * weird tmp bug with osx for http no cache - more to do * undo a lot of the last commit * clear cache in bugs/bug377.rb requests a restart. Yes, you do want that. * move extern shoes_cache_setting to app.h --- bugs/bug377.rb | 20 ++-- make/darwin/xmavericks/env.rb | 2 +- shoes/app.c | 7 +- shoes/app.h | 3 +- shoes/http.h | 5 +- shoes/http/nsurl.m | 6 ++ shoes/http/rbload.c | 48 +-------- shoes/image.c | 192 +++++++++++++++++++++------------- shoes/native/native.h | 3 + shoes/types/download.c | 18 ++-- shoes/types/image.c | 14 +-- shoes/types/pattern.c | 2 - 12 files changed, 164 insertions(+), 156 deletions(-) diff --git a/bugs/bug377.rb b/bugs/bug377.rb index ef676afe..c34b4359 100644 --- a/bugs/bug377.rb +++ b/bugs/bug377.rb @@ -1,34 +1,27 @@ Shoes.app do require 'shoes/data' require 'shoes/image' - app.cache = false stack do flow do - #@el = edit_line "#{DIR}/static/shoes-icon-walkabout.png" - @el = edit_line "https://shoes.mvmanila.com/public/images/dino.jpg" + @el = edit_line "#{DIR}/static/shoes-icon-walkabout.png" + #@el = edit_line "https://shoes.mvmanila.com/public/images/dino.jpg" @cb = check; para "Cached?" button "(Re)load" do @img.clear @img.append do - if @cb.checked? - image @el.text, cache: false - else - image @el.text - end + image @el.text, cache: @cb.checked end end button "Show cache" do @cview.clear @cview.append do eb = edit_box width: 400 - DATABASE.open if DATABASE.closed? DATABASE.each do |key, value| eb.append "#{key} -> #{value}" end end end button "clear caches" do - DATABASE.open if DATABASE.closed? DATABASE.each do |k, val| v = val.split('|') path = Shoes::image_cache_path v[1], File.extname(k) @@ -37,12 +30,19 @@ end DATABASE.clear DATABASE.close + quit if confirm "Please restart Shoes" + end + para "Global cache: " + @sw = switch width: 80 do |n| + app.cache = n.active? + @cb.checked = n.active? end end @img = flow {} @cview = flow {} end start do + @sw.active = app.cache @cb.checked = app.cache end end diff --git a/make/darwin/xmavericks/env.rb b/make/darwin/xmavericks/env.rb index 1a6e1da2..7443a386 100644 --- a/make/darwin/xmavericks/env.rb +++ b/make/darwin/xmavericks/env.rb @@ -54,7 +54,7 @@ DLEXT = "dylib" #LINUX_CFLAGS << " -DSHOES_QUARTZ -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fpascal-strings #{RbConfig::CONFIG["CFLAGS"]} -x objective-c -fobjc-exceptions" LINUX_CFLAGS << " -DVIDEO -DSHOES_QUARTZ -Wall -fpascal-strings -x objective-c -fobjc-exceptions" -LINUX_LDFLAGS = "-framework Cocoa -framework Carbon -dynamiclib -Wl,-single_module INSTALL_NAME" +LINUX_LDFLAGS = "-framework Cocoa -framework QuartzCore -framework Carbon -dynamiclib -Wl,-single_module INSTALL_NAME" LINUX_LIB_NAMES << 'pixman-1' << 'jpeg.8' diff --git a/shoes/app.c b/shoes/app.c index cb85d00e..1ebe32f2 100644 --- a/shoes/app.c +++ b/shoes/app.c @@ -311,10 +311,9 @@ VALUE shoes_app_get_decoration(VALUE app) { return (shoes_native_app_get_decoration(app_t) ? Qtrue : Qfalse); } -extern int shoes_cache_setting; -VALUE shoes_app_set_cache(VALUE app, VALUE bool) { - shoes_cache_setting = (bool == Qtrue) ? 1 : 0; - return bool; +VALUE shoes_app_set_cache(VALUE app, VALUE boolv) { + shoes_cache_setting = (boolv == Qtrue) ? 1 : 0; + return boolv; } VALUE shoes_app_get_cache(VALUE app) { diff --git a/shoes/app.h b/shoes/app.h index c9c77d84..d8df6200 100644 --- a/shoes/app.h +++ b/shoes/app.h @@ -100,7 +100,8 @@ VALUE shoes_app_get_resizable(VALUE); VALUE shoes_app_set_resizable(VALUE, VALUE); VALUE shoes_app_set_cache(VALUE app, VALUE decorated); VALUE shoes_app_get_cache(VALUE app); - +// global var for image cache - declared in types/image.c +extern int shoes_cache_setting; // global var for console up and running extern int shoes_global_terminal; #ifdef SHOES_QUARTZ diff --git a/shoes/http.h b/shoes/http.h index dfa4d5ce..007072ab 100644 --- a/shoes/http.h +++ b/shoes/http.h @@ -29,8 +29,9 @@ typedef struct { } shoes_http_request; void shoes_download(shoes_http_request *req); -void shoes_queue_download(shoes_http_request *req); -shoes_cached_image* shoes_no_cache_queue_download(shoes_http_request *req); +void shoes_native_download(shoes_http_request *req); +//void shoes_queue_download(shoes_http_request *req); +//shoes_cached_image* shoes_no_cache_queue_download(shoes_http_request *req); VALUE shoes_http_err(SHOES_DOWNLOAD_ERROR error); SHOES_DOWNLOAD_HEADERS shoes_http_headers(VALUE hsh); void shoes_http_request_free(shoes_http_request *); diff --git a/shoes/http/nsurl.m b/shoes/http/nsurl.m index c2f67866..6ed3f6da 100644 --- a/shoes/http/nsurl.m +++ b/shoes/http/nsurl.m @@ -245,6 +245,12 @@ - (void)downloadDidFinish: (NSURLDownload *)download shoes_download(req); } +void +shoes_native_download(shoes_http_request *req) +{ + shoes_download(req); +} + VALUE shoes_http_err(SHOES_DOWNLOAD_ERROR code) { diff --git a/shoes/http/rbload.c b/shoes/http/rbload.c index 4c0221c0..f1ab883b 100644 --- a/shoes/http/rbload.c +++ b/shoes/http/rbload.c @@ -15,15 +15,13 @@ #include "shoes/types/download.h" #include "shoes/canvas.h" -extern int shoes_cache_setting; - void shoes_download(shoes_http_request *req) { /* monkey patched out in download.rb - need function for linking */ printf("monkey patch failed\n"); } -void shoes_queue_download(shoes_http_request *req) { - //printf("shoes_queue_download called: %s -> %s\n",req->url,req->filepath); +void shoes_native_download(shoes_http_request *req) { + //printf("shoes_native_download called: %s -> %s\n",req->url,req->filepath); VALUE path, url, opts, svsym, dnobj, stvar; path = rb_str_new2(req->filepath); url = rb_str_new2(req->url); @@ -60,50 +58,10 @@ void shoes_queue_download(shoes_http_request *req) { shoes_catch_message(SHOES_IMAGE_DOWNLOAD, Qnil, side); shoes_http_request_free(req); free(req); - // assume Ruby will garbage collect all the VALUE var's. + // TODO : assume Ruby will garbage collect all the VALUE var's. // after this stack frame pops there's nothing holding them. } -shoes_cached_image* shoes_no_cache_queue_download(shoes_http_request *req) { - VALUE path, url, opts, svsym, dnobj, stvar; - path = rb_str_new2(req->filepath); - url = rb_str_new2(req->url); - opts = rb_hash_new(); - shoes_cached_image *cached; - // make a :save symbol - svsym = ID2SYM(rb_intern("save")); - // add :save and filepath to hash - rb_hash_aset(opts, svsym, path); - // Call Shoes::image_download_sync - defined in image.rb - dnobj = rb_funcall(cShoes, - rb_intern("image_download_sync"), 2, url, opts); - // convert the status var of dnobj to a C int and save it in req->idat - stvar = rb_funcall(dnobj, rb_intern("status"), 0); - int st = NUM2INT(stvar); - // dig the etag field out of headers. - VALUE hdrs = rb_funcall(dnobj, rb_intern("headers"), 0); - shoes_image_download_event *side = req->data; - side->status = st; - VALUE etag = Qnil; - VALUE keys = rb_funcall(hdrs, s_keys, 0); - int i; - for (i = 0; i < RARRAY_LEN(keys); i++ ) { - VALUE key = rb_ary_entry(keys, i); - if (strcmp("etag", RSTRING_PTR(key)) == 0) { - etag = key; - break; - } - } - if (! NIL_P(etag)) - side->etag = RSTRING_PTR(rb_hash_aref(hdrs, etag)); - // may draw the image into side->slot - cached = shoes_no_cache_download(side); - shoes_http_request_free(req); - free(req); - return cached; -} - - VALUE shoes_http_err(SHOES_DOWNLOAD_ERROR code) { /* a little unclear what this does or what it returns I think it converts the platform 'code' to a Shoes string diff --git a/shoes/image.c b/shoes/image.c index da7ea8ac..e96512de 100644 --- a/shoes/image.c +++ b/shoes/image.c @@ -819,7 +819,7 @@ shoes_code shoes_load_imagesize(VALUE imgpath, int *width, int *height) { return SHOES_FAIL; return SHOES_OK; } - +/* shoes_cached_image* shoes_no_cache_download(shoes_image_download_event *evt) { int width, height; shoes_cached_image *cached = shoes_world->blank_cache; @@ -839,6 +839,7 @@ shoes_cached_image* shoes_no_cache_download(shoes_image_download_event *evt) { free(evt); return cached; } +*/ unsigned char shoes_image_downloaded(shoes_image_download_event *idat) { int i, j, width, height; @@ -922,6 +923,82 @@ int shoes_http_image_handler(shoes_http_event *de, void *data) { return SHOES_DOWNLOAD_CONTINUE; } +shoes_cached_image *shoes_load_image_sanity(shoes_cached_image *cached) { + if (cached == NULL) + cached = shoes_world->blank_cache; + return cached; +} + + +// load image, don't cache +shoes_cached_image *shoes_load_image_nocache (VALUE slot, VALUE imgpath) { + shoes_cached_image *cached = NULL; + cairo_surface_t *img = NULL; + VALUE filename = rb_funcall(imgpath, s_downcase, 0); + StringValue(filename); + char *fname = RSTRING_PTR(filename); + int width = 1, height = 1; + + if (strlen(fname) > 7 && (strncmp(fname, "http://", 7) == 0 || strncmp(fname, "https://", 8) == 0)) { + struct timeval tv; + VALUE cache, uext, hdrs, tmppath, uri, scheme, host, port, requ, path, cachepath = Qnil, digest = Qnil; + rb_require("shoes/data"); + uri = rb_funcall(cShoes, rb_intern("uri"), 1, imgpath); + scheme = rb_funcall(uri, s_scheme, 0); + host = rb_funcall(uri, s_host, 0); + port = rb_funcall(uri, s_port, 0); + requ = rb_funcall(uri, s_request_uri, 0); + path = rb_funcall(uri, s_path, 0); + path = rb_funcall(path, s_downcase, 0); + + /* populate the Values used later for a download - be careful + * tmppath calculated later is good enough. Remember, curl could + * might be used again instead of rbload + */ + hdrs = Qnil; + cachepath = Qnil; + digest = Qnil; // a hexdigest hash - not a ruby {} + uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); + // build the req + tmppath = rb_funcall(cShoes, rb_intern("image_temp_path"), 2, uri, uext); + shoes_http_request *req = SHOE_ALLOC(shoes_http_request); + SHOE_MEMZERO(req, shoes_http_request, 1); + shoes_image_download_event *idat = SHOE_ALLOC(shoes_image_download_event); + SHOE_MEMZERO(idat, shoes_image_download_event, 1); + req->url = strdup(RSTRING_PTR(imgpath)); + req->scheme = strdup(RSTRING_PTR(scheme)); + req->host = strdup(RSTRING_PTR(host)); + req->port = NUM2INT(port); + req->path = strdup(RSTRING_PTR(requ)); + req->handler = shoes_http_image_handler; + req->filepath = strdup(RSTRING_PTR(tmppath)); + idat->filepath = strdup(RSTRING_PTR(tmppath)); + idat->uripath = strdup(RSTRING_PTR(imgpath)); + idat->slot = slot; + if (!NIL_P(cachepath)) + idat->cachepath = strdup(RSTRING_PTR(cachepath)); + if (!NIL_P(digest)) + SHOE_MEMCPY(idat->hexdigest, RSTRING_PTR(digest), char, min(42, RSTRING_LEN(digest))); + if (!NIL_P(hdrs)) + req->headers = shoes_http_headers(hdrs); + req->data = idat; + shoes_native_download(req); + img = shoes_surface_create_from_file(tmppath, &width, &height); + if (img != shoes_world->blank_image) { + cached = shoes_cached_image_new(width, height, img); + } + } else { + // read user file + fprintf(stderr, "no cache read from %s\n", RSTRING_PTR(imgpath)); + img = shoes_surface_create_from_file(imgpath, &width, &height); + if (img != shoes_world->blank_image) { + cached = shoes_cached_image_new(width, height, img); + } + } + return shoes_load_image_sanity(cached); +} + + shoes_cached_image *shoes_load_image(VALUE slot, VALUE imgpath, VALUE cache_opt) { shoes_cached_image *cached = NULL; cairo_surface_t *img = NULL; @@ -929,17 +1006,14 @@ shoes_cached_image *shoes_load_image(VALUE slot, VALUE imgpath, VALUE cache_opt) StringValue(filename); char *fname = RSTRING_PTR(filename); int width = 1, height = 1; - int global_cache_save = shoes_cache_setting; // save global setting - shoes_cache_setting = (cache_opt == Qtrue) ? 1 : 0; - - if (cache_opt == Qtrue) { - if (shoes_cache_lookup(RSTRING_PTR(imgpath), &cached)) { - // fprintf(stderr, "using memory cached image\n"); - goto done; - } - } else { - // fall thru - // fprintf(stderr, "always (down)load\n"); + + if (cache_opt != Qtrue) { + return shoes_load_image_nocache(slot, imgpath); + } + // check in memory cache for imgpath + if (shoes_cache_lookup(RSTRING_PTR(imgpath), &cached)) { + fprintf(stderr, "mem cache found: %s\n", RSTRING_PTR(imgpath)); + return shoes_load_image_sanity(cached); } if (strlen(fname) > 7 && (strncmp(fname, "http://", 7) == 0 || strncmp(fname, "https://", 8) == 0)) { struct timeval tv; @@ -952,41 +1026,31 @@ shoes_cached_image *shoes_load_image(VALUE slot, VALUE imgpath, VALUE cache_opt) requ = rb_funcall(uri, s_request_uri, 0); path = rb_funcall(uri, s_path, 0); path = rb_funcall(path, s_downcase, 0); - if (cache_opt != Qtrue) { - /* populate the Values used later for a download - be careful - * tmppath calculated later is good enough. Remember, curl could - * might be used again instead of rbload - */ - hdrs = Qnil; - cachepath = Qnil; - digest = Qnil; // a hexdigest hash - not a ruby {} - uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); - } else { - // check the download cache (~/.shoes/+cache) - cache = rb_funcall(rb_const_get(rb_cObject, rb_intern("DATABASE")), rb_intern("check_cache_for"), 1, imgpath); - uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); - hdrs = Qnil; - if (!NIL_P(cache)) { - VALUE etag = rb_hash_aref(cache, ID2SYM(rb_intern("etag"))); - digest = rb_hash_aref(cache, ID2SYM(rb_intern("hash"))); - if (!NIL_P(digest)) - cachepath = rb_funcall(cShoes, rb_intern("image_cache_path"), 2, digest, uext); - int saved = NUM2INT(rb_hash_aref(cache, ID2SYM(rb_intern("saved")))); - gettimeofday(&tv, 0); - if (tv.tv_sec - saved < SHOES_IMAGE_EXPIRE) { - //fprintf(stderr,"old cache, recursive load\n"); - cached = shoes_load_image(slot, cachepath, Qtrue); // recursive ick! - if (cached != NULL) { - shoes_cache_insert(SHOES_CACHE_ALIAS, imgpath, cached); - goto done; - } - } else if (!NIL_P(etag)) - rb_hash_aset(hdrs = rb_hash_new(), rb_str_new2("If-None-Match"), etag); - } - cached = shoes_cached_image_new(1, 1, shoes_world->blank_image); - if (! NIL_P(cache_opt)) - shoes_cache_insert(SHOES_CACHE_FILE, imgpath, cached); + + // check the download cache (~/.shoes/+cache) + cache = rb_funcall(rb_const_get(rb_cObject, rb_intern("DATABASE")), rb_intern("check_cache_for"), 1, imgpath); + uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); + hdrs = Qnil; + if (!NIL_P(cache)) { + VALUE etag = rb_hash_aref(cache, ID2SYM(rb_intern("etag"))); + digest = rb_hash_aref(cache, ID2SYM(rb_intern("hash"))); + if (!NIL_P(digest)) + cachepath = rb_funcall(cShoes, rb_intern("image_cache_path"), 2, digest, uext); + int saved = NUM2INT(rb_hash_aref(cache, ID2SYM(rb_intern("saved")))); + gettimeofday(&tv, 0); + if (tv.tv_sec - saved < SHOES_IMAGE_EXPIRE) { + //fprintf(stderr,"old cache, recursive load\n"); + cached = shoes_load_image(slot, cachepath, Qtrue); + if (cached != NULL) { + shoes_cache_insert(SHOES_CACHE_ALIAS, imgpath, cached); + return shoes_load_image_sanity(cached); + } + } else if (!NIL_P(etag)) + rb_hash_aset(hdrs = rb_hash_new(), rb_str_new2("If-None-Match"), etag); } + cached = shoes_cached_image_new(1, 1, shoes_world->blank_image); + shoes_cache_insert(SHOES_CACHE_FILE, imgpath, cached); + // build the req for a download tmppath = rb_funcall(cShoes, rb_intern("image_temp_path"), 2, uri, uext); shoes_http_request *req = SHOE_ALLOC(shoes_http_request); @@ -1010,34 +1074,16 @@ shoes_cached_image *shoes_load_image(VALUE slot, VALUE imgpath, VALUE cache_opt) if (!NIL_P(hdrs)) req->headers = shoes_http_headers(hdrs); req->data = idat; - - if (shoes_cache_setting) { - /* - * shoes_queue_download does the download, optional cache settings - * and display of image in the slot. - */ - shoes_queue_download(req); - } else { - // Make sure cached varible points to mething useful when non cached? - cached = shoes_no_cache_queue_download(req); - } - goto done; - - } - - /* here when reading from file */ - //fprintf(stderr, "Read file %s\n",RSTRING_PTR(imgpath)); - img = shoes_surface_create_from_file(imgpath, &width, &height); - if (img != shoes_world->blank_image) { + shoes_native_download(req); + } else { + /* here when reading from file */ + fprintf(stderr, "Read and mem cache file %s\n",RSTRING_PTR(imgpath)); + img = shoes_surface_create_from_file(imgpath, &width, &height); + if (img != shoes_world->blank_image) { cached = shoes_cached_image_new(width, height, img); - if (cache_opt == Qtrue) - shoes_cache_insert(SHOES_CACHE_FILE, imgpath, cached); + shoes_cache_insert(SHOES_CACHE_FILE, imgpath, cached); + } } - -done: - if (cached == NULL) - cached = shoes_world->blank_cache; - shoes_cache_setting = global_cache_save; // restore global setting - return cached; + return shoes_load_image_sanity(cached); } diff --git a/shoes/native/native.h b/shoes/native/native.h index b76d4869..41777d2c 100644 --- a/shoes/native/native.h +++ b/shoes/native/native.h @@ -46,6 +46,9 @@ double shoes_native_app_get_opacity(shoes_app *app); void shoes_native_app_set_opacity(shoes_app *app, double opacity); void shoes_native_app_set_decoration(shoes_app *app, gboolean decorated); int shoes_native_app_get_decoration(shoes_app *app); +void shoes_native_app_resize_window(shoes_app *); +VALUE shoes_native_get_resizable(shoes_app *app); +void shoes_native_set_resizable(shoes_app *app, int resizable); shoes_code shoes_native_app_open(shoes_app *, char *, int); void shoes_native_app_show(shoes_app *); void shoes_native_loop(void); diff --git a/shoes/types/download.c b/shoes/types/download.c index 86e50eb7..b3c312ae 100644 --- a/shoes/types/download.c +++ b/shoes/types/download.c @@ -2,7 +2,6 @@ // ruby VALUE cDownload, cResponse; -extern int shoes_cache_setting; FUNC_M("+download", download, -1); EVENT_COMMON(http, http_klass, start); @@ -34,7 +33,6 @@ void shoes_download_init() { } // ruby (download) -extern int shoes_cache_setting; void shoes_http_mark(shoes_http_klass *dl) { rb_gc_mark_maybe(dl->parent); @@ -208,7 +206,7 @@ VALUE shoes_http_threaded(VALUE self, VALUE url, VALUE attr) { data->download = obj; req->data = data; - shoes_queue_download(req); + shoes_native_download(req); return obj; } @@ -274,13 +272,15 @@ int shoes_catch_message(unsigned int name, VALUE obj, void *data) { hash = rb_str_new2(side->hexdigest); if (side->etag != NULL) etag = rb_str_new2(side->etag); - uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); - rb_funcall(rb_const_get(rb_cObject, rb_intern("DATABASE")), + if (shoes_cache_setting) { + uext = rb_funcall(rb_cFile, rb_intern("extname"), 1, path); + rb_funcall(rb_const_get(rb_cObject, rb_intern("DATABASE")), rb_intern("notify_cache_of"), 3, uri, etag, hash); - if (side->status != 304) { - realpath = rb_funcall(cShoes, rb_intern("image_cache_path"), 2, hash, uext); - rename(side->filepath, RSTRING_PTR(realpath)); - } + if (side->status != 304) { + realpath = rb_funcall(cShoes, rb_intern("image_cache_path"), 2, hash, uext); + rename(side->filepath, RSTRING_PTR(realpath)); + } + } } free(side->filepath); diff --git a/shoes/types/image.c b/shoes/types/image.c index c40bcd02..7ffc7ef9 100644 --- a/shoes/types/image.c +++ b/shoes/types/image.c @@ -1,3 +1,4 @@ +#include "shoes/app.h" #include "shoes/types/native.h" #include "shoes/types/color.h" #include "shoes/types/pattern.h" @@ -144,7 +145,7 @@ void shoes_image_free(shoes_image *image) { shoes_transform_release(image->st); RUBY_CRITICAL(SHOE_FREE(image)); } -extern int shoes_cache_setting; + VALUE shoes_image_new(VALUE klass, VALUE path, VALUE attr, VALUE parent, shoes_transform *st) { VALUE obj = Qnil; @@ -160,18 +161,13 @@ VALUE shoes_image_new(VALUE klass, VALUE path, VALUE attr, VALUE parent, shoes_t image->attr = attr; image->parent = shoes_find_canvas(parent); COPY_PENS(image->attr, basic->attr); + int saved_cache_setting = shoes_cache_setting; VALUE cache_opt = shoes_cache_setting ? Qtrue : Qfalse; VALUE vcache = shoes_hash_get(attr,rb_intern("cache")); if (! NIL_P(vcache)) { cache_opt = vcache; } - /* - if (cache_opt == Qnil || cache_opt == Qfalse) { - fprintf(stderr,"won't cache\n"); - } else { - fprintf(stderr,"will cache\n"); - } - */ + if (rb_obj_is_kind_of(path, cImage)) { shoes_image *image2; Data_Get_Struct(path, shoes_image, image2); @@ -193,7 +189,7 @@ VALUE shoes_image_new(VALUE klass, VALUE path, VALUE attr, VALUE parent, shoes_t image->type = SHOES_CACHE_MEM; if (!NIL_P(block)) DRAW(obj, canvas->app, rb_funcall(block, s_call, 0)); } - + shoes_cache_setting = saved_cache_setting; return obj; } diff --git a/shoes/types/pattern.c b/shoes/types/pattern.c index 4c1c062d..84a90111 100644 --- a/shoes/types/pattern.c +++ b/shoes/types/pattern.c @@ -38,8 +38,6 @@ void shoes_pattern_init() { // ruby -extern int shoes_cache_setting; - void shoes_pattern_mark(shoes_pattern *pattern) { rb_gc_mark_maybe(pattern->source); rb_gc_mark_maybe(pattern->parent);