Skip to content

Commit e6b3c34

Browse files
authored
Merge pull request #37 from mpevnev/master
Add @nogc to all extern blocks
2 parents 7fa009b + 5ac1941 commit e6b3c34

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

source/deimos/ncurses/curses.d

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ immutable enum
6565
/* This is defined in more than one ncurses header, for identification */
6666
string NCURSES_VERSION = "5.7";
6767

68-
extern (C) nothrow
68+
extern (C) @nogc nothrow
6969
{
7070

7171
/* types */
@@ -925,8 +925,6 @@ int vid_attr(chtype a, ...)
925925
* These functions are extensions - not in X/Open Curses.
926926
*/
927927
//TODO Check
928-
alias int function(WINDOW *, void *) NCURSES_WINDOW_CB;
929-
alias int function(SCREEN *, void *) NCURSES_SCREEN_CB;
930928

931929
bool is_term_resized(int lines, int columns);
932930
char* keybound(int keycode, int count);
@@ -1492,3 +1490,12 @@ body
14921490
}
14931491

14941492
}//end extern (C)
1493+
1494+
// Things where @nogc would be needlessly limiting.
1495+
extern (C) nothrow
1496+
{
1497+
1498+
alias int function(WINDOW *, void *) NCURSES_WINDOW_CB;
1499+
alias int function(SCREEN *, void *) NCURSES_SCREEN_CB;
1500+
1501+
}

source/deimos/ncurses/form.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import core.stdc.stdarg;
3939
public import deimos.ncurses.ncurses;
4040
public import deimos.ncurses.eti;
4141

42-
extern(C)
42+
extern(C) @nogc
4343
{
4444

4545
alias void* FIELD_CELL;

source/deimos/ncurses/menu.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module deimos.ncurses.menu;
3535
public import deimos.ncurses.curses,
3636
deimos.ncurses.eti;
3737

38-
extern(C)
38+
extern(C) @nogc
3939
{
4040

4141
alias int Menu_Options;

source/deimos/ncurses/panel.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module deimos.ncurses.panel;
3838

3939
public import deimos.ncurses.curses;
4040

41-
extern (C)
41+
extern (C) @nogc
4242
{
4343

4444
struct PANEL

source/deimos/ncurses/unctrl.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module deimos.ncurses.unctrl;
4545

4646
string NCURSES_VERSION = "5.7";
4747
alias uint chtype;
48-
extern (C) char* unctrl(chtype);
48+
extern (C) char* unctrl(chtype) @nogc;
4949

5050

5151
/* NCURSES_UNCTRL_H_incl */

0 commit comments

Comments
 (0)