Skip to content

Instantly share code, notes, and snippets.

View chrstphrchvz's full-sized avatar
🕳️
I tend to disappear

Christopher Chavez chrstphrchvz

🕳️
I tend to disappear
  • San Antonio, TX
View GitHub Profile
@chrstphrchvz
chrstphrchvz / tcl.diff
Created November 17, 2018 13:01
tcl/tk 8.6.9rc4 vs 8.6.9 final (2018-11-16)
diff -r -u tcl8.6.9rc4/changes tcl8.6.9-final/changes
--- tcl8.6.9rc4/changes 2018-11-09 13:13:55.000000000 -0600
+++ tcl8.6.9-final/changes 2018-11-16 12:40:53.000000000 -0600
@@ -8891,4 +8891,6 @@
2018-11-09 (bug)[35a8f1] overlong string length of some lists (owens)
+2018-11-16 (bug)[00d04c] Repair [binary encode base64] (sebres)
+
- Released 8.6.9, November 16, 2018 - details at http://core.tcl-lang.org/tcl/ -
@chrstphrchvz
chrstphrchvz / string16.ii
Created December 9, 2021 02:11
Preprocessor output for chromium/base/strings/string16.cc (from qtwebengine-chromium 87-based) with macOS 12 SDK. Compile with `clang++ -std=c++14 -stdlib=libc++ -c string16.ii`.
This file has been truncated, but you can view the full file.
# 1 "../../3rdparty/chromium/base/strings/string16.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 405 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "../../3rdparty/chromium/base/strings/string16.cc" 2
@chrstphrchvz
chrstphrchvz / utf_string_conversions.ii
Created December 10, 2021 09:15
Preprocessor output for chromium/base/strings/utf_string_conversions.cc (from qtwebengine-chromium 87-based) with macOS 12 SDK. Compile with `clang++ -std=c++14 -stdlib=libc++ -c utf_string_conversions.ii`.
This file has been truncated, but you can view the full file.
# 1 "../../3rdparty/chromium/base/strings/utf_string_conversions.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 405 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "../../3rdparty/chromium/base/strings/utf_string_conversions.cc" 2
@chrstphrchvz
chrstphrchvz / gist:40b4af859a44f2f2efba2db370c2a10e
Created May 19, 2023 04:39
Unreported Tkinter test failure on Tk 8.7
(Not sure if this is actually due to 8.7)
======================================================================
FAIL: test_create_polygon (test.test_tkinter.test_widgets.CanvasTest.test_create_polygon)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 861, in test_create_polygon
self.assertEqual(c.bbox(i1), (19, 9, 61, 51))
AssertionError: Tuples differ: (18, 8, 62, 52) != (19, 9, 61, 51)
@chrstphrchvz
chrstphrchvz / tkMacOSXRegion_excerpt.c
Created July 30, 2023 17:51
XEqualRegion() for Tk Aqua using __HIShapeEqual() using FindSymbol() hack
// FindSymbol() approach stolen from https://stackoverflow.com/a/21855885/4896937
// Adapted from:
// https://github.com/0xced/iOS-Artwork-Extractor/blob/master/Classes/FindSymbol.c
// Adapted from MoreAddrToSym / GetFunctionName()
// http://www.opensource.apple.com/source/openmpi/openmpi-8/openmpi/opal/mca/backtrace/darwin/MoreBacktrace/MoreDebugging/MoreAddrToSym.c
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
static void *FindSymbol(const struct mach_header *img, const char *symbol)
{
if ((img == NULL) || (symbol == NULL))