libev icon indicating copy to clipboard operation
libev copied to clipboard

code confused

Open jason51285128 opened this issue 5 years ago • 6 comments

I am confused about this line of code:

#define VARx(type,name) VAR(name, type name)

I searched the entire project, and can‘t find definition of macro VAR(name, type name), could you please make a short explain? @enki

jason51285128 avatar Mar 27 '19 03:03 jason51285128

Look better ;-) https://github.com/enki/libev/blob/93823e6ca699df195a6c7b8bfa6006ec40ee0003/ev.c#L1818 Commonly used technique: define some approach before include header. Some times it uses as code-generation helper.

h4tr3d avatar Mar 27 '19 04:03 h4tr3d

Look better ;-) libev/ev.c

Line 1818 in 93823e6

#define VAR(name,decl) decl;

Commonly used technique: define some approach before include header. Some times it uses as code-generation helper.

got it! Thanks a lot! @h4tr3d

jason51285128 avatar Mar 27 '19 05:03 jason51285128

i'd just keep in mind that this is not the official repo but just a manually created woefully out of date copy

On Wed, Mar 27, 2019 at 2:05 AM, hktkzcc < [email protected] > wrote:

Look better ;-) libev/ ev. c ( https://github.com/enki/libev/blob/93823e6ca699df195a6c7b8bfa6006ec40ee0003/ev.c#L1818 )

Line 1818 in 93823e6 ( http:///enki/libev/commit/93823e6ca699df195a6c7b8bfa6006ec40ee0003 )

#define VAR(name,decl) decl;

Commonly used technique: define some approach before include header. Some times it uses as code-generation helper.

got it! Thanks a lot! @ h4tr3d ( https://github.com/h4tr3d )

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/enki/libev/issues/4#issuecomment-476977075 ) , or mute the thread ( https://github.com/notifications/unsubscribe-auth/AABy4480ee65FEhdxijGecCtOfaOIKLGks5vavwjgaJpZM4cM4nT ).

enki avatar Mar 27 '19 05:03 enki

yes, I just wonder how this library working, so I checkout this repository.

jason51285128 avatar Mar 27 '19 06:03 jason51285128

You can view the original repository http://cvs.schmorp.de/libev/ Also, there is very good documentation http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod

dr-begemot avatar Mar 27 '19 07:03 dr-begemot

good links! Thanks! @dr-begemot

jason51285128 avatar Mar 27 '19 07:03 jason51285128