Comments (1)
You need to consider a few things. First, the way you use it in the first case (to get val1), may work or not, depending on the compiler (just checked on macOS + Clang and it worked). Hash table works with keys and values, but it does not look into the semantics of them, hence, pointers are typically converted to integers. Here, you use the same text string, but there is no guarantee that a compiler will use the same address in both locations.
Second, I guess that you have a typo when you wanted to check val2, and instead you are checking val1 again. This case with val2 should actually work correctly and give you 64 as the result.
from plibsys.
Related Issues (20)
- shmem test fails on Fedora 37 HOT 2
- Project builds with visual studio but not ninja and MinGW : error: 'ERROR_INVALID_HANDLE' undeclared (first use in this function) HOT 4
- Major performance improvement question HOT 4
- Unable create share memory more than 4GB on windows HOT 2
- [p_hash_table_remove] Twice calc/search was performed HOT 1
- Missing AF_INET definition on Windows HOT 4
- how to create only .a library HOT 1
- Problems compiling with static library HOT 1
- How about using C STD uint32_t instead of puint32 and so on? HOT 1
- bug in pp_shm_buffer_get_free_space function HOT 1
- If possible, raw sockets?
- New Data Structures? HOT 1
- Possible *small* memory leak? HOT 4
- Check state of plibsys library initalization HOT 1
- pmacros_test fails HOT 3
- Header files not using relative includes. HOT 1
- CMAKE 2.8.0 is getting deprecated HOT 1
- A weirded error: ld.exe: final link failed: Permission denied HOT 1
- Question: is AArch64 supported ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plibsys.