Skip to content

Commit da396e1

Browse files
committed
πŸ“Œ Nodepp | Bug Fixing - Github Action for cross-platform compilation testing | V1.2.12 πŸ“Œ
1 parent 72cc49b commit da396e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+83
-131
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ void onMain() {
180180
- πŸ”—: [Nodepp for WASM](https://github.com/NodeppOfficial/nodepp-wasm)
181181

182182
## Projects made with NodePP
183+
- πŸ”—: [Computer Vision VR Controllers for phones Demo](https://github.com/PocketVR/Barely_VR_AR_Controller_Test)
183184
- πŸ”—: [Draw on your PC using your smartphone](https://github.com/ScreenDraw/PCDraw)
184185
- πŸ”—:Β [Simple multiplayer Game With Raylib](https://medium.com/@EDBCBlog/create-your-own-online-multiplayer-small-fast-and-fun-with-raylib-nodepp-and-websockets-190f5c174094)
185186
- πŸ”—:Β [Cursed Luna - A simple Raylib Game](https://github.com/EDBCREPO/Space-Shocker)
@@ -197,6 +198,7 @@ Check out some articles on [Medium](https://medium.com/@EDBCBlog)
197198
- πŸ”—: [SerialPP](https://github.com/NodeppOfficial/nodepp-serial) -> Serial Port for Nodepp
198199
- πŸ”—: [Argon2](https://github.com/NodeppOfficial/nodepp-argon2) -> Argon2 for Nodepp
199200
- πŸ”—: [Torify](https://github.com/NodeppOfficial/nodepp-torify) -> HTTP|Ws over Tor
201+
- πŸ”—: [GPUPP](https://github.com/NodeppOfficial/nodepp-gpu) -> GPGPU for Nodepp
200202
- πŸ”—: [NginxPP](https://github.com/NodeppOfficial/nodepp-nginx) -> Reverse Proxy
201203
- πŸ”—: [InputPP](https://github.com/NodeppOfficial/nodepp-input) -> Fake Inputs
202204
- πŸ”—: [XML](https://github.com/NodeppOfficial/nodepp-xml) -> XML for Nodepp

β€Žinclude/nodepp/generator.hβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ namespace nodepp { namespace generator { namespace ws {
545545

546546
public:
547547

548-
template<class T> coEmit( T* str, char* bf, const ulong& sx ) { int c=0;
548+
template<class T> coEmit( T* str, char* bf, const ulong& sx ) {
549549
coBegin ; memset( bf, 0, sx ); size=0; data=0; len=0; key=0;
550550
memset( &frame, 0, sizeof(ws_frame_t) );
551551

β€Žinclude/nodepp/nodepp.hβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace nodepp { namespace process { array_t<string_t> args;
9090
/*─······································································─*/
9191

9292
void start( int argc, char** args ){
93-
int i=0; onSIGEXIT.once([=](){ process::exit(1); }); do {
93+
int i=0; onSIGEXIT.once([=](){ process::exit(0); }); do {
9494
if(!regex::test(args[i],"^\\?") ) {
9595
process::args.push(args[i]);
9696
} else {
@@ -104,7 +104,7 @@ namespace nodepp { namespace process { array_t<string_t> args;
104104
void stop(){
105105
while(!process::should_close() )
106106
{ process::next(); }
107-
process::exit(1);
107+
process::exit(0);
108108
}
109109

110110
/*─······································································─*/

β€Žinclude/nodepp/object.hβ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,7 @@ namespace nodepp { class object_t {
114114
bool has_value() const { return obj->type<0?false:obj->mem.has_value(); }
115115
uint type_size() const { return obj->type<0?false:obj->mem.type_size(); }
116116

117-
template< class U > U as() const {
118-
try { return obj->mem.as<U>(); } catch( except_t ) {
119-
throw except_t( "item does not exists" );
120-
} }
117+
template< class U > U as() const { return obj->mem.as<U>(); }
121118

122119
/*─······································································─*/
123120

β€Žinclude/nodepp/posix/cluster.cppβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ namespace nodepp { class cluster_t : public generator_t {
127127
void free() const noexcept {
128128

129129
if( is_state( FILE_STATE::REUSE ) && obj.count()>1 ){ resume(); return; }
130-
if( is_state( FILE_STATE::KILL ) ){ return; } close(); kill();
130+
if( is_state( FILE_STATE::KILL ) ){ return; }
131+
if(!is_state( FILE_STATE::CLOSE ) ){ kill(); onDrain.emit(); } else { kill(); }
131132

132133
/*
133134
obj->input.close(); obj->output.close();

β€Žinclude/nodepp/posix/epoll.cppβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace nodepp { class poll_t : public generator_t {
6161
/*─······································································─*/
6262

6363
template< class T, class... V >
64-
void* push( int fd, T cb, const V&... arg ) const noexcept {
64+
void* push( int fd, T cb, const V&... args ) const noexcept {
6565

6666
ptr_t<waiter> tsk = new waiter();
6767
auto clb=type::bind( cb );
@@ -70,7 +70,7 @@ namespace nodepp { class poll_t : public generator_t {
7070
obj->queue.push({ fd, [=](){
7171
if( tsk->out==0 ){ return -1; }
7272
if( tsk->blk==1 ){ return 1; }
73-
tsk->blk =1; int rs=(*clb)( arg... );
73+
tsk->blk =1; int rs=(*clb)( args... );
7474
if( clb.null () ){ return -1; }
7575
tsk->blk =0; return !tsk->out ? -1 : rs;
7676
} });

β€Žinclude/nodepp/posix/file.cppβ€Ž

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ namespace nodepp { class file_t {
5252
int feof = 1;
5353
ptr_t<char> buffer;
5454
string_t borrow;
55-
limit::probe_t limit_probe;
5655
}; ptr_t<NODE> obj;
5756

57+
/*─······································································─*/
58+
5859
bool is_std() const noexcept { return obj->fd>0 && obj->fd<3; }
5960

6061
/*─······································································─*/
@@ -176,8 +177,9 @@ namespace nodepp { class file_t {
176177

177178
virtual void free() const noexcept {
178179

179-
if( is_state(FILE_STATE::REUSE) && obj.count() > 1 ){ resume(); return; }
180-
if( is_state(FILE_STATE::KILL ) ){ return; } close(); kill();
180+
if( is_state( FILE_STATE::REUSE ) && obj.count() > 1 ){ resume(); return; }
181+
if( is_state( FILE_STATE::KILL ) ){ return; }
182+
if(!is_state( FILE_STATE::CLOSE ) ){ kill(); onDrain.emit(); } else { kill(); }
181183

182184
onUnpipe.clear(); onResume.clear();
183185
onError .clear(); onStop .clear();

β€Žinclude/nodepp/posix/kpoll.cppβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace nodepp { class poll_t : public generator_t {
6363
/*─······································································─*/
6464

6565
template< class T, class... V >
66-
void* push( int fd, T cb, const V&... arg ) const noexcept {
66+
void* push( int fd, T cb, const V&... args ) const noexcept {
6767

6868
ptr_t<waiter> tsk = new waiter();
6969
auto clb=type::bind( cb );
@@ -72,7 +72,7 @@ namespace nodepp { class poll_t : public generator_t {
7272
obj->queue.push({ fd, [=](){
7373
if( tsk->out==0 ){ return -1; }
7474
if( tsk->blk==1 ){ return 1; }
75-
tsk->blk =1; int rs=(*clb)( arg... );
75+
tsk->blk =1; int rs=(*clb)( args... );
7676
if( clb.null () ){ return -1; }
7777
tsk->blk =0; return !tsk->out ? -1 : rs;
7878
} });

β€Žinclude/nodepp/posix/limit.cppβ€Ž

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,3 @@ namespace nodepp { namespace limit { ulong _count_=0;
4949
}}
5050

5151
/*────────────────────────────────────────────────────────────────────────────*/
52-
53-
namespace nodepp { namespace limit { class probe_t{ public:
54-
virtual ~probe_t() noexcept { --_count_; }
55-
/*----*/ probe_t() noexcept { ++_count_; }
56-
};}}
57-
58-
/*────────────────────────────────────────────────────────────────────────────*/

β€Žinclude/nodepp/posix/npoll.cppβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace nodepp { class poll_t : public generator_t {
7676
obj->queue.push([=](){
7777
if( tsk->out==0 ){ return -1; }
7878
if( tsk->blk==1 ){ return 1; }
79-
tsk->blk =1; int rs=(*clb)( arg... );
79+
tsk->blk =1; int rs=(*clb)( args... );
8080
if( clb.null() ){ return -1; }
8181
tsk->blk =0; return !tsk->out?-1:rs;
8282
});

0 commit comments

Comments
Β (0)