[MacOS X][ANN] RAliasFile Initial Release

L

Luc Heinrich

I'd be glad hearing comments upon it.

Ok, here we go:

1. The RUBY_PLATFORM test in your extconf.rb file is broken. It will =20
only allow to build the extension for a ruby *built* under 10.4.7. =20
For example, it will fail for a ruby built on 10.4.6 but running =20
under 10.4.7. And the regexp you are using is incorrect to begin with =20=

('.' does not match '.', but any character).

2. You are adding include paths to CFLAGS which you don't need. Only =20
Carbon and CoreFoundation are required, you can remove everything else.

3. Same for LDFLAGS, you only need to link against the Carbon and =20
CoreFoundation frameworks, forget about CoreServices and Foundation.

4. I have no idea how your extension can work, because it really =20
should not. You are defining methods for RAliasFile which is a global =20=

variable set to Qnil, instead of defining them for cRAliasFile which =20
you correctly define first. This makes no sense. Remove RAliasFile, =20
you don't need it.

5. Same story for the alias_path global variable, it's totally =20
useless as far as I can tell.

6. Having "version" as an instance method is bogus, you should =20
probably make it a singleton method.


That's after a quick 5mn look, there's probably more to say... :)

--=20
Luc Heinrich - (e-mail address removed) - http://www.honk-honk.com
 
U

Une bévue

Luc Heinrich said:
Ok, here we go:

1. The RUBY_PLATFORM test in your extconf.rb file is broken. It will
only allow to build the extension for a ruby *built* under 10.4.7.
For example, it will fail for a ruby built on 10.4.6 but running
under 10.4.7. And the regexp you are using is incorrect to begin with
('.' does not match '.', but any character).

ok, i've corrected that to /powerpc-darwin8\.\d\.\d/
2. You are adding include paths to CFLAGS which you don't need. Only
Carbon and CoreFoundation are required, you can remove everything else.

3. Same for LDFLAGS, you only need to link against the Carbon and
CoreFoundation frameworks, forget about CoreServices and Foundation.

ok corrected
4. I have no idea how your extension can work, because it really
should not. You are defining methods for RAliasFile which is a global
variable set to Qnil, instead of defining them for cRAliasFile which
you correctly define first. This makes no sense. Remove RAliasFile,
you don't need it.

5. Same story for the alias_path global variable, it's totally
useless as far as I can tell.

ok too...
6. Having "version" as an instance method is bogus, you should
probably make it a singleton method.

fixed ))

thanks a lot for your help, i now have a 0.0.2 version ...
 
A

Austin Ziegler

ok, i've corrected that to /powerpc-darwin8\.\d\.\d/

That won't work on my Mac, will it? (Checking.) Nope. My platform is
i686-darwin8.7.1. So unless you're *only* wanting this to work on
older Macs, you'll need to have /.*-darwin8.*/ (if darwin8 is the
right version; darwin may be the right choice).

I haven't *tried* it, yet -- too much work to do today -- but just a note.

-austin
--=20
Austin Ziegler * (e-mail address removed) * http://www.halostatue.ca/
* (e-mail address removed) * http://www.halostatue.ca/feed/
* (e-mail address removed)
 
U

Une bévue

Austin Ziegler said:
That won't work on my Mac, will it? (Checking.) Nope. My platform is
i686-darwin8.7.1. So unless you're *only* wanting this to work on
older Macs, you'll need to have /.*-darwin8.*/ (if darwin8 is the
right version; darwin may be the right choice).

I haven't *tried* it, yet -- too much work to do today -- but just a note.

fine thanks for this point, i can change it quickly.
 
L

Luc Heinrich

change line 6 (just after "case RUBY_PLATFORM") to :

when /.*-darwin8.*/

Ok now let's push this a bit further: why are you limiting the
compilation to Tiger ? You don't seem to use any Tiger specific call,
not to mention the fact that you are limiting compilation to Tiger
*only* so Leopard users won't be able to compile it either. Just
remove the test, it's useless :)
 
U

Une bévue

Luc Heinrich said:
Ok now let's push this a bit further: why are you limiting the
compilation to Tiger ?

i just want a user of not Mac OS X to be advice this prog works only on
Mac OS X.

that's the "8" preventing compilation over Leopard ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,211
Messages
2,571,092
Members
47,693
Latest member
david4523

Latest Threads

Top