Skip to content

Instantly share code, notes, and snippets.

--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -3083,7 +3083,7 @@ ListConcatInPlace(ListObject *self, PyOb
}
Py_DECREF(lookup_dict);
- Py_INCREF(self);
+ Py_INCREF((PyObject*)self);
return (PyObject *)(self);
}
@k-takata
k-takata / envmeter.rb
Last active August 4, 2023 21:31
Temperature, humidity and pressure meter using GR-CITRUS + AE-BME680 + LCD module (AQM1602Y-FLW-FBW)
#!mruby
class LCD
ID = 0x3E
def initialize
@i2c = I2c.new(1)
end
def init
@k-takata
k-takata / bme680.rb
Created July 23, 2023 03:22
Using AE-BME680 with GR-CITRUS
#!mruby
class BME680
ID = 0x77
#REG_COEFF3 = 0x00
REG_FIELD0 = 0x1D
REG_IDAC_HEAT0 = 0x50
REG_RES_HEAT0 = 0x5A
REG_GAS_WAIT0 = 0x64
@k-takata
k-takata / py3-hook-linux.diff
Created December 27, 2022 09:24
Similar patch to 8.2.4317 for Linux
diff --git a/src/errors.h b/src/errors.h
index e33f2e66b..c23aac526 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -3213,7 +3213,7 @@ EXTERN char e_autoload_import_cannot_use_absolute_or_relative_path[]
EXTERN char e_cannot_use_partial_here[]
INIT(= N_("E1265: Cannot use a partial here"));
#endif
-#if defined(FEAT_PYTHON3) && defined(MSWIN)
+#if defined(FEAT_PYTHON3) && (defined(MSWIN) || defined(__linux__))
@k-takata
k-takata / 2002-windows_transparency.diff
Last active February 10, 2023 06:10
Updated for 9.0.1294 and later
# HG changeset patch
# Parent fde93adeda8d91c54211d002010c4476c27e8dcc
# Parent 04bb907f937cefc1a013ccdaa2e54569944b57a8
implement 'transparency' for Windows GUI
diff --git a/src/gui_w32.c b/src/gui_w32.c
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -50,6 +50,13 @@ static int gui_mswin_get_menu_height(int
# define gui_mswin_get_menu_height(fix_window) 0
@k-takata
k-takata / vim-commit-counts.txt
Last active September 16, 2021 01:02
Vim commit counts and Japanese contributors
2010 年から 2021-09-15 時点までの年ごとのコミット数およびパッチ数ランキング
日本人と思われる人には行頭に * でマーク
2010 7.2.326 - 7.3.094
638 commits
25 (Dominique Pelle)
12 (Lech Lorens)
11 (Sergey Khorev)
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -177,6 +177,7 @@ CROSS_COMPILE = i586-pc-mingw32msvc-
endif
DEL = rm
MKDIR = mkdir -p
+TOUCH = touch
DIRSLASH = /
else
#include <windows.h>
int main(int argc, char *argv[])
{
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
char buf[256];
DWORD cb;
ReadFile(hstdin, buf, sizeof(buf), &cb, NULL);
diff --git a/sakura_lang_en_US/Makefile b/sakura_lang_en_US/Makefile
index 0949faa3..4de6510b 100644
--- a/sakura_lang_en_US/Makefile
+++ b/sakura_lang_en_US/Makefile
@@ -23,6 +23,9 @@ endif
# If empty, it will be output to the default directory.
OUTDIR =
+# The directory where sakura_core is built.
+COREBUILDDIR =