This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%module(threads="1") something | |
%{ | |
// Register a callback (called from Python code) | |
// callbackFunc is a Python callable accepting one argument | |
void registerHandler(PyObject *callbackFunc) | |
{ | |
SWIG_PYTHON_THREAD_BEGIN_ALLOW; | |
const bool hasCallback = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if 1==0 ( | |
echo first build (debug) | |
echo second build (release) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(echo %version%) > version.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
struct StrRange; | |
template<size_t N> | |
struct StrRange<const char[N]> | |
{ | |
typedef const char * ConstIterator; | |
StrRange(const char (&t)[N]) | |
: m_begin(t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template<typename T> | |
struct Foo | |
{ | |
void do_something(); | |
Foo() | |
{ | |
std::cout << "ctor" << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void func_with_fork() | |
{ | |
// local vars | |
auto r = std::async(std::launch::async, [&]() { | |
// forked thread code | |
}); | |
// main thread code | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forward_variables usage example | |
include(forward_variables.cmake) | |
# After call to this function, all variables set by find_package will be forwarded to | |
# function caller scope (i.e. into parent scope). | |
function(find_boost_package) | |
start_track_variables() | |
set(bla_bla 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6252e5f867d6e1bea603aa2a0e24e6e0b861ea9f Mon Sep 17 00:00:00 2001 | |
From: Andrey Upadyshev <[email protected]> | |
Date: Tue, 18 Nov 2014 18:48:52 +0100 | |
Subject: Log patch: fixes incorrect output of the dump manipulator, when used | |
on AVX2-enabled CPU (e.g. Intel Haswell). | |
--- | |
libs/log/src/dump_avx2.cpp | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "logger.h" | |
Logger Logger::instance_; | |
void Logger::log() | |
{ | |
//... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx | |
index 14e2794..01bb31d 100644 | |
--- a/Source/Modules/python.cxx | |
+++ b/Source/Modules/python.cxx | |
@@ -2378,7 +2378,7 @@ public: | |
Printv(f->def, linkage, builtin_ctor ? "int " : "PyObject *", wname, "(PyObject *self, PyObject *args) {", NIL); | |
Wrapper_add_local(f, "argc", "int argc"); | |
- Printf(tmp, "PyObject *argv[%d]", maxargs + 1); | |
+ Printf(tmp, "PyObject *argv[%d] = {}", maxargs + 1); |
OlderNewer