Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1
ocaml
ocaml-3.08.1-type_punning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ocaml-3.08.1-type_punning.patch of Package ocaml
--- byterun/globroots.c +++ byterun/globroots.c @@ -60,11 +60,13 @@ struct global_root * update[NUM_LEVELS]; struct global_root * e, * f; int i, new_level; + union { struct global_root_list *grl; struct global_root *gr; }pun; Assert (((intnat) r & 3) == 0); /* compact.c demands this (for now) */ + pun.grl = &caml_global_roots; /* Init "cursor" to list head */ - e = (struct global_root *) &caml_global_roots; + e = pun.gr; /* Find place to insert new node */ for (i = caml_global_roots.level; i >= 0; i--) { while (1) { @@ -81,7 +83,7 @@ new_level = random_level(); if (new_level > caml_global_roots.level) { for (i = caml_global_roots.level + 1; i <= new_level; i++) - update[i] = (struct global_root *) &caml_global_roots; + update[i] = pun.gr; caml_global_roots.level = new_level; } e = caml_stat_alloc(sizeof(struct global_root) + @@ -100,9 +102,11 @@ struct global_root * update[NUM_LEVELS]; struct global_root * e, * f; int i; - + union { struct global_root_list *grl; struct global_root *gr; }pun; + /* Init "cursor" to list head */ - e = (struct global_root *) &caml_global_roots; + pun.grl = &caml_global_roots; + e = pun.gr; /* Find element in list */ for (i = caml_global_roots.level; i >= 0; i--) { while (1) { --- otherlibs/threads/scheduler.c +++ otherlibs/threads/scheduler.c @@ -135,10 +135,11 @@ static void thread_scan_roots(scanning_action action) { caml_thread_t th, start; + union {caml_thread_t c_t; value *vp;} pun = { &curr_thread }; /* Scan all active descriptors */ start = curr_thread; - (*action)((value) curr_thread, (value *) &curr_thread); + (*action)((value) curr_thread, pun.vp); /* Don't scan curr_thread->sp, this has already been done. Don't scan local roots either, for the same reason. */ for (th = start->next; th != start; th = th->next) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor