-
-
Notifications
You must be signed in to change notification settings - Fork 12
[PATCH] Micro helper library #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This message has 1 attachment(s) |
|
you have a better idea ? ;-p |
Type corrections are needed: strlen() returns a value of type size_t, not int. |
What about $(src_root)/lib directory?
Why is it necessary to create a directory 'mhl', if there is a directory 'lib'?
My propose:
|
in addition to my previous comment:
... and, of course, change files configure.ac and Makefile.am for correctly compile with new changes. |
Well.. as this should go to 4.6.2 which is only a bugfixing release I doesn't want to restructure the code here.
We can restructurize the code afterwards in a new ticket ( I think there is already a ticket about restructurizing the code)... This would then belong into this ticket not into this one.
I would now (for the 4.6.X branch) leave mhl where it is (or move it to lib/mhl but leaving the rest as it is. |
Ah... if after release-4.6 out mhl will move to lib - I agree :) |
extend mhl: use glib (if #defined WITH_GLIB) |
Changes from rev001 to rev002 between patches for better review |
oops...
mhl/memory.h:4
REGEX_MALLOC must be removed. This stuff copyed from src/regex.c (for correctly declate 'alloca' function).
In any case, patch need to review and rework. |
@Slava: your alloca() changes are very fine, but:
a) the glib stuff is quite useless, just adds extra code without any benefit and makes the binary more expensive (adds farcalls to funcs which far-call funcs that could have been inlined)
b) moving the funcs to separate .c file just kills inline'ing. |
Setting milestone to 4.6.2 as we noone on the ML said anything against this and we really need parts of this patch in order to fix other important stuff. |
On a modern computers it's don't important :) For other systems we make own realization of glib-functions... if needed :)
Modern compilers may automatically make some function inline or not. In mc-ru-fork we was attempt to use own standart _GNU_INLINE_ (make some checks in configure-script)
See next attach.
Some example of usage:
For more info about this need to consult with Pavlinux(Russian team of mc-ru-fork)... but he not present in this trac... :(
P.S. I will return inline'ing to functions back. :) |
Some checks for GNU-extensions in compiler for support inline'ing |
|
BTW, in mhl/string.c some warnings:
adding string to a top of mhl/string.c:
don't avoid warnings. Because one of current includedir in CFLAGS is a: -I./
Or may exists other way? |
Hey,
After a discussion with slavaz on jabber I created a new branch called 157_mhl_additions_to_master which the stuff recently added by him. After that I've reverted the stuff from slavaz in the old branch so that we can get a minimalistic stuff into 4.6.2 to fix there some problems.
So please have _now_ a look on the 157_mhl_addition branch and vote! :) |
Replying to slavazanko:
uhm, so what? moving to a separate .c file still kills inlining. period. |
Useless code is always a mess, at least for maintenance.
We dont need any extra solution, just leave it as it was.
Only if they can. As soon as you put the code in an extra .c file, which
This would only make sense if you want to *enforce* inline'ing on
cu |
|
Cool.. this is approved now.
@metux: Could you please merge this into mc-4.6 and master? After that I'll work on the whitespace issues and completion. :) |
|
|
Closing. Remote branch is removed. |
Important
This issue was migrated from Trac:
Enrico.Weigelt@….local, metux IT service <weigelt@….de>
vote-winnie
,vote-slavazanko
,committed-master
,committed-mc-4.6
this patch introduces some new mhl/*.h files with things like (safer) memory management and string handling, shell escaping, etc
Committed to master:
[4765514]
Committed to mc-4.6:
[1e2ed2f]
Note
Original attachments:
Jan 9, 2009 at 19:33 UTC
slavazanko
(@slavaz) onJan 13, 2009 at 9:55 UTC
slavazanko
(@slavaz) onJan 13, 2009 at 9:56 UTC
slavazanko
(@slavaz) onJan 14, 2009 at 8:38 UTC
The text was updated successfully, but these errors were encountered: