1. memstruct ?[UNSOLVED]

Hello,

I am trying the 4.1.0 beta. I thought there was going to be a memstruct function in it, so that C structs would be easier to wrap. Was this feature not implemented? Here is the piece of code I'm trying to wrap using the memstruct function.

memstruct struct_sfVideoMode 
	atom width 
	atom height 
	atom bitsPerPixel 
end memstruct 
 
atom sfv = allocate(sizeof(struct_sfVideoMode)) 
sfv.struct_sfVideoMode = 0 
 
sfv = sfVideoMode(w,h,bits) 
 
? sfv.struct_sfVideoMode.width 
 
free(sfv) 

Was the way you use it changed? Or do you have to do something else entirely?

new topic     » topic index » view message » categorize

2. Re: memstruct ?

I don't believe memstruct is in the Euphoria 4.1 beta. It isn't mentioned in the documentation. I expect that at some point it will be in the distribution but not yet.

new topic     » goto parent     » topic index » view message » categorize

3. Re: memstruct ?

LarryMiller said...

I don't believe memstruct is in the Euphoria 4.1 beta. It isn't mentioned in the documentation. I expect that at some point it will be in the distribution but not yet.

That's kinda of shame then if it isn't. I was really hoping it was, it would really help with wrapping some libraries. I hope it is implentmented in the final release or some sort of structure, it will Euphoria tremendously.

new topic     » goto parent     » topic index » view message » categorize

4. Re: memstruct ?[UNSOLVED]

Lone_EverGreen_Ranger said...

Hello,

I am trying the 4.1.0 beta. I thought there was going to be a memstruct function in it, so that C structs would be easier to wrap. Was this feature not implemented? Here is the piece of code I'm trying to wrap using the memstruct function.

memstruct struct_sfVideoMode 
	atom width 
	atom height 
	atom bitsPerPixel 
end memstruct 
 
atom sfv = allocate(sizeof(struct_sfVideoMode)) 
sfv.struct_sfVideoMode = 0 
 
sfv = sfVideoMode(w,h,bits) 
 
? sfv.struct_sfVideoMode.width 
 
free(sfv) 

Was the way you use it changed? Or do you have to do something else entirely?

It's in its own branch ("struct") currently. There are some things that need to be finished, I think, and certainly some bugs. If you have a 4.1 binary, you should be able to build it from there. The syntax is more geared towards making it easy to model actual C structs. It allows stuff like "int" and "long" and should work correctly as far as C is concerned.

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: memstruct ?[UNSOLVED]

mattlewis said...
Lone_EverGreen_Ranger said...

Hello,

I am trying the 4.1.0 beta. I thought there was going to be a memstruct function in it, so that C structs would be easier to wrap. Was this feature not implemented? Here is the piece of code I'm trying to wrap using the memstruct function.

memstruct struct_sfVideoMode 
	atom width 
	atom height 
	atom bitsPerPixel 
end memstruct 
 
atom sfv = allocate(sizeof(struct_sfVideoMode)) 
sfv.struct_sfVideoMode = 0 
 
sfv = sfVideoMode(w,h,bits) 
 
? sfv.struct_sfVideoMode.width 
 
free(sfv) 

Was the way you use it changed? Or do you have to do something else entirely?

It's in its own branch ("struct") currently. There are some things that need to be finished, I think, and certainly some bugs. If you have a 4.1 binary, you should be able to build it from there. The syntax is more geared towards making it easy to model actual C structs. It allows stuff like "int" and "long" and should work correctly as far as C is concerned.

Matt

Ah, I see. I have 4.1 binary, but I can wait until it is finished. I hope the struct or memstruct will be in the final/offical release/build of 4.1.0. It will come in handy for a lot of things.

new topic     » goto parent     » topic index » view message » categorize

6. Re: memstruct ?[UNSOLVED]

Lone_EverGreen_Ranger said...

Ah, I see. I have 4.1 binary, but I can wait until it is finished. I hope the struct or memstruct will be in the final/offical release/build of 4.1.0. It will come in handy for a lot of things.

We have a feature freeze right now, so that definitely won't happen. Maybe 4.1.1 - at this point, I just wanna get 4.1.0 out the door more than anything else here.

new topic     » goto parent     » topic index » view message » categorize

7. Re: memstruct ?[UNSOLVED]

jimcbrown said...
Lone_EverGreen_Ranger said...

Ah, I see. I have 4.1 binary, but I can wait until it is finished. I hope the struct or memstruct will be in the final/offical release/build of 4.1.0. It will come in handy for a lot of things.

We have a feature freeze right now, so that definitely won't happen. Maybe 4.1.1 - at this point, I just wanna get 4.1.0 out the door more than anything else here.

Ah I see. Well I might try to build it myself, sometime. I hope it becomes part of Euphoria by 4.1.1. I also hope 4.1.0 will be out soon.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu