Skip to content

Commit

Permalink
Initial net module package function implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Feb 9, 2025
1 parent 256859f commit 73020f7
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
33 changes: 33 additions & 0 deletions std/n8std/Net.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2024 - Nathanne Isip
* This file is part of N8.
*
* N8 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* N8 is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with N8. If not, see <https://www.gnu.org/licenses/>.
*/

#include "n8std/Net.hpp"

#include <n8/ast/TerminativeSignal.hpp>

#include <quoneq/net.hpp>

N8_FUNC(net_init) {
quoneq_net::init();
return {};
}

N8_FUNC(net_deinit) {
quoneq_net::cleanup();
return {};
}
40 changes: 40 additions & 0 deletions std/n8std/Net.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2025 - Nathanne Isip
* This file is part of N8.
*
* N8 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* N8 is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with N8. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef N8_STDLIB_NET_CC
#define N8_STDLIB_NET_CC

#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
#endif

#include "N8Library.hpp"

N8_LIB_START

N8_FUNC(net_init);
N8_FUNC(net_deinit);

N8_LIB_END

#ifdef __clang__
# pragma clang diagnostic pop
#endif

#endif

0 comments on commit 73020f7

Please sign in to comment.