| 08-04-2006, 10:58 AM | #1 |
Since we can now create natives by using the system discovered and created by xttocs, I was just wondering, why can't we make a super handle type, which infact is a structure that contains a pointer to a handle value, and a structure array for linking? I'm not very good at prorgamming and efficiency but wouldn't this actually work faster? There are of course still two problems. One would be the compatibility of the super handle with the already existant natives. Adapting them would be very difficult, but making a native which returns the value of the handle from the structure would work. Not sure though how much this would slow the whole stuff. So to make it shorter, it would look like this (dunno jAPI syntax so this is just a sketch) struct Linker { char label[40]; handle linker; } struct SuperHandle{ handle h; Linker i[100]; } Ofcourse, to make it more efficient we could try instaed of a static array to make a dynamic list or something. It can be optimized by those who know more programming than me (algorithmic especially), but just curious if this idea is good or not. Sorry if this is dumb! ~Daelin |
| 08-04-2006, 01:05 PM | #2 |
I would say this is better to have in programming. You could just use integers there, and rely on the return bug, it currently seems that the return bug isn't unsafe but the whole wc3 engine is so we can't escape of handle indexes problems |
